Don't await for some background messages

pull/590/head
Beaudan Brown 6 years ago
parent 8ccf62ed4e
commit 653fd06451

@ -782,7 +782,7 @@
response: 'accepted', response: 'accepted',
status: ['pending', 'expired'], status: ['pending', 'expired'],
}); });
window.libloki.api.sendOnlineBroadcastMessage(this.id); window.libloki.api.sendBackgroundMessage(this.id);
return true; return true;
} }
return false; return false;
@ -1822,7 +1822,7 @@
await this.setSessionResetStatus(SessionResetEnum.request_received); await this.setSessionResetStatus(SessionResetEnum.request_received);
// send empty message, this will trigger the new session to propagate // send empty message, this will trigger the new session to propagate
// to the reset initiator. // to the reset initiator.
await window.libloki.api.sendBackgroundMessage(this.id); window.libloki.api.sendBackgroundMessage(this.id);
}, },
isSessionResetReceived() { isSessionResetReceived() {
@ -1858,7 +1858,7 @@
async onNewSessionAdopted() { async onNewSessionAdopted() {
if (this.get('sessionResetStatus') === SessionResetEnum.initiated) { if (this.get('sessionResetStatus') === SessionResetEnum.initiated) {
// send empty message to confirm that we have adopted the new session // send empty message to confirm that we have adopted the new session
await window.libloki.api.sendBackgroundMessage(this.id); window.libloki.api.sendBackgroundMessage(this.id);
} }
await this.createAndStoreEndSessionMessage({ await this.createAndStoreEndSessionMessage({
type: 'incoming', type: 'incoming',

Loading…
Cancel
Save