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

@ -37,7 +37,10 @@ use serde_json::value::RawValue as RawJsonValue;
use tokio::sync::{RwLock, RwLockWriteGuard, Semaphore};
use tracing::{debug, error, info, trace, warn};
use super::{state_compressor::CompressedStateEvent, timeline::PduId};
use super::{
short::ShortStateKey, state_compressor::CompressedStateEvent,
timeline::PduId,
};
use crate::{
service::{globals::SigningKeys, pdu},
services,
@ -1120,7 +1123,7 @@ impl Service {
&self,
room_id: &RoomId,
room_version_id: &RoomVersionId,
incoming_state: HashMap<u64, Arc<EventId>>,
incoming_state: HashMap<ShortStateKey, Arc<EventId>>,
) -> Result<Arc<HashSet<CompressedStateEvent>>> {
debug!("Loading current room state ids");
let current_sstatehash = services()