Skip to content

Commit

Permalink
Block post-join actions on crypto setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Nov 23, 2022
1 parent 21fa31c commit a9e6e11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,12 @@ export class Bridge {
return;
}

if (this.config.encryption) {
// Ensure crypto is aware of all members of this room before posting any messages,
// so that the bot can share room keys to all recipients first.
await this.as.botClient.crypto.onRoomJoin(roomId);
}

const adminAccountData = await this.as.botIntent.underlyingClient.getSafeRoomAccountData<AdminAccountData>(
BRIDGE_ROOM_TYPE, roomId,
);
Expand Down

0 comments on commit a9e6e11

Please sign in to comment.