We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca338ca commit db0e30bCopy full SHA for db0e30b
1 file changed
packages/apps/deno-runtime/lib/room.ts
@@ -6,7 +6,7 @@ import type { IUser } from '@rocket.chat/apps-engine/definition/users/IUser';
6
interface IRoomManager {
7
getBridges(): {
8
getInternalBridge(): {
9
- doGetUsernamesOfRoomById(id: string | undefined): Promise<Array<string>>;
+ doGetUsernamesOfRoomById(id: string): Promise<Array<string>>;
10
};
11
12
}
@@ -50,6 +50,8 @@ export class Room {
50
* @deprecated
51
*/
52
public get usernames(): Promise<Array<string>> {
53
+ if (!this.id) return Promise.resolve([]);
54
+
55
if (!this._USERNAMES) {
56
this._USERNAMES = this[PrivateManager]?.getBridges().getInternalBridge().doGetUsernamesOfRoomById(this.id);
57
0 commit comments