Implement Dehydrated Devices MSC3814 (closes #200)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-27 07:20:23 +00:00
parent f613d0c2ad
commit f660e00bb5
9 changed files with 308 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ use ruma::{
};
use serde_json::json;
use tuwunel_core::{
Err, Result, at, implement,
Err, Result, implement,
utils::{
self, ReadyExt,
stream::{IterStream, TryIgnore},
@@ -90,6 +90,11 @@ pub async fn remove_device(&self, user_id: &UserId, device_id: &DeviceId) {
})
.await;
// Removes the dehydrated device if the ID matches, otherwise no-op
self.remove_dehydrated_device(user_id, Some(device_id))
.await
.ok();
// TODO: Remove onetimekeys
increment(&self.db.userid_devicelistversion, user_id.as_bytes());