fix: Ensure events received from federated invites have event IDs

This commit is contained in:
timedout authored and Ellis Git committed 2026-10-04 23:28:31 +00:00
1 parent b0aa49901e
commit d7d0a9bb3d
5 files changed
+18 -42

No files matched your search

+2 -1
View File
@@ -305,7 +305,7 @@ async fn validate_invite_state(
"PDU in invite state (index {idx}) violates the room event format"
)));
};
let (state_event_room_id, state_event_id, state_event_json) = services
let (state_event_room_id, state_event_id, mut state_event_json) = services
.rooms
.event_handler
.parse_incoming_pdu(&raw_pdu, Some(room_version_rules))
@@ -349,6 +349,7 @@ async fn validate_invite_state(
entry.key(),
))),
| Entry::Vacant(entry) => {
state_event_json.insert("event_id".to_owned(), state_event_id.to_string().into());
if entry.key().0 == StateEventType::RoomCreate {
// Ensure this is a legal create event.
let pdu_event =