From a90cebcabb2acd9804cd43cc1c6a61f6db62f9fb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 19 Aug 2020 16:58:28 +0200 Subject: [PATCH] document access levels --- src/matrix/room/Room.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 28cd0a50..954dc62f 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -41,6 +41,7 @@ export class Room extends EventEmitter { this._changedMembersDuringSync = null; } + /** @package */ async writeSync(roomResponse, membership, txn) { const summaryChanges = this._summary.writeSync(roomResponse, membership, 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}; } + /** @package */ afterSync({summaryChanges, newTimelineEntries, newLiveKey, removedPendingEvents, changedMembers}) { this._syncWriter.afterSync(newLiveKey); if (changedMembers.length) { @@ -76,10 +78,12 @@ export class Room extends EventEmitter { } } + /** @package */ resumeSending() { this._sendQueue.resumeSending(); } + /** @package */ load(summary, txn) { try { this._summary.load(summary); @@ -89,10 +93,12 @@ export class Room extends EventEmitter { } } + /** @public */ sendEvent(eventType, content) { return this._sendQueue.enqueueEvent(eventType, content); } + /** @public */ async loadMemberList() { if (this._memberList) { this._memberList.retain(); @@ -161,14 +167,17 @@ export class Room extends EventEmitter { } } + /** @public */ get name() { return this._summary.name; } + /** @public */ get id() { return this._roomId; } + /** @public */ async openTimeline() { if (this._timeline) { throw new Error("not dealing with load race here for now"); @@ -189,10 +198,12 @@ export class Room extends EventEmitter { return this._timeline; } + /** @public */ mxcUrlThumbnail(url, width, height, method) { return this._hsApi.mxcUrlThumbnail(url, width, height, method); } + /** @public */ mxcUrl(url) { return this._hsApi.mxcUrl(url); }