fix: Store event_id on state events received from send_knock #2387
No reviewers
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity!2387
Loading…
Reference in a new issue
No description provided.
Delete branch "eleboucher/continuwuity:fix/knock-outlier-event-id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #2386.
When knocking on a remote room, the state events returned by send_knock were saved as outlier PDUs without an event_id field. Reading the room version back then failed to deserialize the create event, and get_room_power_levels panicked while the knock event was appended, returning a 500.
This inserts event_id into each event before storing it as an outlier, as the other outlier writers already do.
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
48e4e9435240cd3216a1@ -614,6 +614,7 @@ async fn knock_room_helper_remote(.get_or_create_shortstatekey(&event_type, &state_key).await;event.insert("event_id".into(), CanonicalJsonValue::String(event_id.to_string()));Uhh I'm too busy to check but I would like to double check that this won't do anything evil to create events
The outlier was stored without event_id, so reading the create event back failed. It's now added before storing, like the other outlier writers. It doesn't affect the reference hash or the federation send.