fix: Remove previous tokens from database

Prevent some panics, accidental soft-logouts instead of hard ones, and
prevents stale tokens revoking sessions.
This commit is contained in:
Jade Ellis committed 2026-11-27 18:41:45 +00:00
1 parent 7bdfea0704
commit 25464134d8
2 files changed
+31 -8

No files matched your search

+1
View File
@@ -92,6 +92,7 @@ impl super::Service {
self.db.token_userdeviceid.remove(&old_token);
self.db.userdeviceid_tokenexpires.del(userdeviceid);
}
self.db.userdeviceid_previoustoken.del(userdeviceid);
// Remove todevice events
let prefix = (user_id, device_id, Interfix);