Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Don't try to send presence updates until the client is started
Browse files Browse the repository at this point in the history
Otherwise we can start making API reqiests which can fail which
can trigger things like the soft logout code.

Fixes element-hq/element-web#12943
  • Loading branch information
dbkr committed Apr 7, 2020
1 parent 0e1341c commit 8d68a4a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,6 @@ async function startMatrixClient(startSyncing=true) {
UserActivity.sharedInstance().start();
TypingStore.sharedInstance().reset(); // just in case
ToastStore.sharedInstance().reset();
if (!SettingsStore.getValue("lowBandwidth")) {
Presence.start();
}
DMRoomMap.makeShared().start();
IntegrationManagers.sharedInstance().startWatching();
ActiveWidgetStore.start();
Expand All @@ -603,6 +600,11 @@ async function startMatrixClient(startSyncing=true) {

// This needs to be started after crypto is set up
DeviceListener.sharedInstance().start();
// Similarly, don't start sending presence updates until we've started
// the client
if (!SettingsStore.getValue("lowBandwidth")) {
Presence.start();
}

// dispatch that we finished starting up to wire up any other bits
// of the matrix client that cannot be set prior to starting up.
Expand Down

0 comments on commit 8d68a4a

Please sign in to comment.