call getDirectMessages on initial sync and every time a new channel is made

This commit is contained in:
emerson 2022-05-02 17:33:26 -04:00
parent 63bf00394d
commit 52ddd1cfd9

View file

@ -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);