Abstract Pdu filter matching into trait Event.

Abstract Pdu unsigned accessors into trait Event.

Abstract Pdu relation related into trait Event.

Abstract PDU content into trait Event.

Move event_id utils from pdu to event.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2025-05-11 07:02:14 +00:00
1 parent 222e89f6fe
commit af7dfb31bc
56 files changed
+666 -492

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ use ruma::{
use serde_json::{json, value::to_raw_value};
use tuwunel_core::{
Error, Result, err, info,
matrix::{StateKey, pdu::PduBuilder},
matrix::{Event, StateKey, pdu::PduBuilder},
};
use crate::Ruma;
@@ -226,7 +226,7 @@ pub(crate) async fn upgrade_room_route(
.room_state_get(&body.room_id, event_type, "")
.await
{
| Ok(v) => v.content.clone(),
| Ok(v) => v.content().to_owned(),
| Err(_) => continue, // Skipping missing events.
};