matrix-rust-sdk
matrix-rust-sdk copied to clipboard
Redacting a room state event does not appear to redact the event in the local store
Describe the bug
I'm redacting a state event with JoinedRoom::redact(state_event_id)
and the trace log shows that the following sync contains the redaction event. When I retrieve the original state event after that with JoinedRoom::get_state_event_static(state_event_id)
I get the original event (enum variant), not the redacted one. @jplatte mentioned that it should already update the local store and redact the event there, similar to what synapse does. An alternative might be to re-fetch the redacted event from synapse.
To Reproduce Steps to reproduce the behavior:
- Send state event
- Redact with
JoinedRoom::redact(state_event_id)
- Wait for sync
- Fetch state event again via
JoinedRoom::get_state_event_static(state_event_id)
Expected behavior The state event should be the redacted enum variant of the event.
@johannescpk I cannot confirm this problem here. Please check out the PR I've created, it contains two integration tests for this scenario, one with get_state_event
and one using get_state_event_static
- neither fails. Or am I doing something differently than what you are expecting/doing? Thanks for checking it out.
Honestly the more interesting case to me seems like what happens if you use get_state_event[_static]
without syncing with the server again.