Skip to content

Commit

Permalink
encryption enabled for new rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
jtulloch committed Oct 12, 2023
1 parent fea6581 commit f9e8a39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/chat/matrix-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export class MatrixClient implements IChatClient {

const initial_state: any[] = [
{ type: EventType.RoomGuestAccess, state_key: '', content: { guest_access: GuestAccess.Forbidden } },
{ type: EventType.RoomEncryption, state_key: '', content: { algorithm: 'm.megolm.v1.aes-sha2' } },
];

if (coverUrl) {
Expand Down Expand Up @@ -339,6 +340,11 @@ export class MatrixClient implements IChatClient {

await this.matrix.initCrypto();

// suppsedly the setter is deprecated, but the direct property set doesn't seem to work.
// this is hopefully only a short-term setting anyway, so just leaving for now.
// this.matrix.getCrypto().globalBlacklistUnverifiedDevices = false;
this.matrix.setGlobalErrorOnUnknownDevices(false);

await this.matrix.startClient();
await this.waitForSync();

Expand Down

0 comments on commit f9e8a39

Please sign in to comment.