Use Arc for EventIds in PDUs

Upgrades Ruma again to make this work.
This commit is contained in:
Jonas Platte 2021-11-27 17:44:52 +01:00
parent 11a21fc136
commit 34d3f74f36
No known key found for this signature in database
GPG key ID: CC154DE0E30B7C67
11 changed files with 81 additions and 76 deletions

View file

@ -52,6 +52,7 @@ pub async fn send_state_event_for_key_route(
db.flush()?;
let event_id = (*event_id).to_owned();
Ok(send_state_event::Response { event_id }.into())
}
@ -93,6 +94,7 @@ pub async fn send_state_event_for_empty_key_route(
db.flush()?;
let event_id = (*event_id).to_owned();
Ok(send_state_event::Response { event_id }.into())
}
@ -267,7 +269,7 @@ async fn send_state_event_for_key_helper(
event_type: EventType,
json: &Raw<AnyStateEventContent>,
state_key: String,
) -> Result<Box<EventId>> {
) -> Result<Arc<EventId>> {
let sender_user = sender;
// TODO: Review this check, error if event is unparsable, use event type, allow alias if it