document access levels

This commit is contained in:
Bruno Windels 2020-08-19 16:58:28 +02:00
parent 113c9e13b3
commit a90cebcabb

View File

@ -41,6 +41,7 @@ export class Room extends EventEmitter {
this._changedMembersDuringSync = null; this._changedMembersDuringSync = null;
} }
/** @package */
async writeSync(roomResponse, membership, txn) { async writeSync(roomResponse, membership, txn) {
const summaryChanges = this._summary.writeSync(roomResponse, membership, txn); const summaryChanges = this._summary.writeSync(roomResponse, membership, txn);
const {entries, newLiveKey, changedMembers} = await this._syncWriter.writeSync(roomResponse, txn); const {entries, newLiveKey, changedMembers} = await this._syncWriter.writeSync(roomResponse, txn);
@ -51,6 +52,7 @@ export class Room extends EventEmitter {
return {summaryChanges, newTimelineEntries: entries, newLiveKey, removedPendingEvents, changedMembers}; return {summaryChanges, newTimelineEntries: entries, newLiveKey, removedPendingEvents, changedMembers};
} }
/** @package */
afterSync({summaryChanges, newTimelineEntries, newLiveKey, removedPendingEvents, changedMembers}) { afterSync({summaryChanges, newTimelineEntries, newLiveKey, removedPendingEvents, changedMembers}) {
this._syncWriter.afterSync(newLiveKey); this._syncWriter.afterSync(newLiveKey);
if (changedMembers.length) { if (changedMembers.length) {
@ -76,10 +78,12 @@ export class Room extends EventEmitter {
} }
} }
/** @package */
resumeSending() { resumeSending() {
this._sendQueue.resumeSending(); this._sendQueue.resumeSending();
} }
/** @package */
load(summary, txn) { load(summary, txn) {
try { try {
this._summary.load(summary); this._summary.load(summary);
@ -89,10 +93,12 @@ export class Room extends EventEmitter {
} }
} }
/** @public */
sendEvent(eventType, content) { sendEvent(eventType, content) {
return this._sendQueue.enqueueEvent(eventType, content); return this._sendQueue.enqueueEvent(eventType, content);
} }
/** @public */
async loadMemberList() { async loadMemberList() {
if (this._memberList) { if (this._memberList) {
this._memberList.retain(); this._memberList.retain();
@ -161,14 +167,17 @@ export class Room extends EventEmitter {
} }
} }
/** @public */
get name() { get name() {
return this._summary.name; return this._summary.name;
} }
/** @public */
get id() { get id() {
return this._roomId; return this._roomId;
} }
/** @public */
async openTimeline() { async openTimeline() {
if (this._timeline) { if (this._timeline) {
throw new Error("not dealing with load race here for now"); throw new Error("not dealing with load race here for now");
@ -189,10 +198,12 @@ export class Room extends EventEmitter {
return this._timeline; return this._timeline;
} }
/** @public */
mxcUrlThumbnail(url, width, height, method) { mxcUrlThumbnail(url, width, height, method) {
return this._hsApi.mxcUrlThumbnail(url, width, height, method); return this._hsApi.mxcUrlThumbnail(url, width, height, method);
} }
/** @public */
mxcUrl(url) { mxcUrl(url) {
return this._hsApi.mxcUrl(url); return this._hsApi.mxcUrl(url);
} }