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

@ -286,6 +286,7 @@ pub async fn ban_user_route(
third_party_invite: None,
blurhash: db.users.blurhash(&body.user_id)?,
reason: None,
join_authorized_via_users_server: None,
}),
|event| {
serde_json::from_str(event.content.get())
@ -604,6 +605,7 @@ async fn join_room_by_id_helper(
third_party_invite: None,
blurhash: db.users.blurhash(sender_user)?,
reason: None,
join_authorized_via_users_server: None,
})
.expect("event is valid, we just created it"),
);
@ -757,6 +759,7 @@ async fn join_room_by_id_helper(
third_party_invite: None,
blurhash: db.users.blurhash(sender_user)?,
reason: None,
join_authorized_via_users_server: None,
};
db.rooms.build_and_append_pdu(
@ -906,6 +909,7 @@ pub(crate) async fn invite_helper<'a>(
third_party_invite: None,
blurhash: None,
reason: None,
join_authorized_via_users_server: None,
})
.expect("member event is valid value");
@ -939,7 +943,7 @@ pub(crate) async fn invite_helper<'a>(
}
let pdu = PduEvent {
event_id: ruma::event_id!("$thiswillbefilledinlater").to_owned(),
event_id: ruma::event_id!("$thiswillbefilledinlater").into(),
room_id: room_id.to_owned(),
sender: sender_user.to_owned(),
origin_server_ts: utils::millis_since_unix_epoch()
@ -1117,6 +1121,7 @@ pub(crate) async fn invite_helper<'a>(
third_party_invite: None,
blurhash: db.users.blurhash(user_id)?,
reason: None,
join_authorized_via_users_server: None,
})
.expect("event is valid, we just created it"),
unsigned: None,