Add bulk one_time_keys adder to interface.

Add device_exists to interface.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-27 05:49:55 +00:00
parent a30c043386
commit 8959d9e2c1
3 changed files with 50 additions and 37 deletions

View File

@@ -391,6 +391,14 @@ pub async fn get_device_metadata(
.deserialized()
}
#[implement(super::Service)]
pub async fn device_exists(&self, user_id: &UserId, device_id: &DeviceId) -> bool {
self.db
.userdeviceid_metadata
.contains(&(user_id, device_id))
.await
}
#[implement(super::Service)]
pub async fn get_devicelist_version(&self, user_id: &UserId) -> Result<u64> {
self.db