Add wrapper types for short IDs

This commit is contained in:
Lambda 2024-08-27 14:27:12 +00:00
parent f1642c92d1
commit b0f33207fe
28 changed files with 427 additions and 232 deletions

View file

@ -1,6 +1,6 @@
use ruma::{OwnedRoomId, OwnedUserId, RoomId, UserId};
use crate::Result;
use crate::{service::rooms::short::ShortStateHash, Result};
pub(crate) trait Data: Send + Sync {
fn reset_notification_counts(
@ -32,14 +32,14 @@ pub(crate) trait Data: Send + Sync {
&self,
room_id: &RoomId,
token: u64,
shortstatehash: u64,
shortstatehash: ShortStateHash,
) -> Result<()>;
fn get_token_shortstatehash(
&self,
room_id: &RoomId,
token: u64,
) -> Result<Option<u64>>;
) -> Result<Option<ShortStateHash>>;
fn get_shared_rooms<'a>(
&'a self,