Clear session store when re-registering
When we re-register, our deviceId might change, which makes our sessions are no longer valid since the recipient will see us as a new device. Fixes #388
This commit is contained in:
parent
a52d35bb1b
commit
80d32103d1
4 changed files with 50 additions and 26 deletions
|
@ -228,6 +228,13 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
clearSessionStore: function() {
|
||||
return new Promise(function(resolve) {
|
||||
var sessions = new SessionCollection();
|
||||
sessions.sync('delete', sessions, {}).always(resolve);
|
||||
});
|
||||
|
||||
},
|
||||
getIdentityKey: function(identifier) {
|
||||
if (identifier === null || identifier === undefined)
|
||||
throw new Error("Tried to get identity key for undefined/null key");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue