generalize get_room_version

There are other fields of `m.room.create` events that are useful to
individually extract without caring about the values of other fields.
This commit is contained in:
Charles Hall 2024-11-08 18:11:11 -08:00
parent c9c30fba30
commit a4e1522875
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 69 additions and 24 deletions

View file

@ -38,6 +38,7 @@ use crate::{
service::{
globals::SigningKeys,
pdu::{gen_event_id_canonical_json, PduBuilder},
rooms::state::ExtractVersion,
},
services, utils, Ar, Error, PduEvent, Ra, Result,
};
@ -1324,8 +1325,10 @@ pub(crate) async fn invite_helper(
(pdu, pdu_json, invite_room_state)
};
let room_version_id =
services().rooms.state.get_room_version(room_id)?;
let room_version_id = services()
.rooms
.state
.get_create_content::<ExtractVersion>(room_id)?;
let response = services()
.sending