refactor for ruma identifiers optimizations

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-28 23:31:24 +00:00 committed by strawberry
parent d91570d0e6
commit 0a9b6c136f
19 changed files with 81 additions and 88 deletions

View file

@ -75,7 +75,7 @@ pub(super) async fn parse_pdu(&self) -> Result<RoomMessageEventContent> {
match serde_json::from_str(&string) {
| Ok(value) => match ruma::signatures::reference_hash(&value, &RoomVersionId::V6) {
| Ok(hash) => {
let event_id = EventId::parse(format!("${hash}"));
let event_id = OwnedEventId::parse(format!("${hash}"));
match serde_json::from_value::<PduEvent>(
serde_json::to_value(value).expect("value is json"),