From 52ddd1cfd9ff796e507b99358a73d74a9e626cb5 Mon Sep 17 00:00:00 2001 From: emerson Date: Mon, 2 May 2022 17:33:26 -0400 Subject: [PATCH] call getDirectMessages on initial sync and every time a new channel is made --- src/Server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Server.ts b/src/Server.ts index 2999d20..0535ee1 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -50,6 +50,7 @@ export class Server { this.ourMatrixUser = this.getOrCreateMatrixUser(this.mxid); this.apiCall.get("/account/whoami").then(r => { this.doLog("Authentication successful, starting initial sync"); + this.getDirectMessages(); this.doSync(); }).catch(e => { console.log(e); @@ -111,6 +112,7 @@ export class Server { if (maybeChannel) return maybeChannel; + this.getDirectMessages(); const newChannel = new Channel(roomId, this); this.syncLocks.add(newChannel); this.roomIdToChannel.set(roomId, newChannel);