mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
fix: Ensure events received from federated invites have event IDs
This commit is contained in:
1 parent
b0aa49901e
commit
d7d0a9bb3d
5 files changed
+18
-42
No files matched your search
@@ -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 =
|
||||
|
||||
Reference in new issue
Block a user