refactor: Use a shared helper function for submitting state events at room creation

On room creation, A list of initial state events may be provided that
should be submitted to the room after creation. These events
should be treated as any other state event and submitted to
the same checks.

With this change, state events submitted on room creation will be
submitted through the same helper as those through the usual endpoint.

The submission helper is moved to the timeline service to make it
available everywhere. This will be useful for implementing MSC4140
(issue #903).
This commit is contained in:
new-years-eve authored and timedout committed 2026-07-26 15:06:38 +01:00
1 parent 8cde2ad0cc
commit 7f8c2aedc8
5 files changed
+388 -304

No files matched your search

+5
View File
@@ -1,3 +1,8 @@
use ruma::{
events::{AnyStateEventContent, room::member::RoomMemberEventContent},
serde::Raw,
};
use super::*;
#[test]