Merge pull request #4353 from matrix-org/dbkr/start_presence_after_client_init

Don't try to send presence updates until the client is started
pull/21833/head
David Baker 2020-04-07 12:31:04 +01:00 committed by GitHub
commit 5b263f1905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

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