fix MSC3912-relation-based-redaction for room versions > 10#19782
Open
jason-famedly wants to merge 2 commits into
Open
fix MSC3912-relation-based-redaction for room versions > 10#19782jason-famedly wants to merge 2 commits into
jason-famedly wants to merge 2 commits into
Conversation
… 'redacts' key in v11)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Room version 11 moved the
redactskey for redaction events from top-level to inside thecontentsobject of an Event. Incorporate the change needed to maintain this MSC remains operational.This fixes some MSC3912 behavior when used with room versions > 10.
Needed to pass room version 11 & 12 unit tests. 3 fail without this
Test results before
A bit more context:
By using the raw initial
EventBasefrom the original redaction request, this included theredactskey incontentsfor the original targeted event that needed redaction. This was not being changed or overwritten by the new redaction event that was being created to handle a related event, instead a new top-levelredactskey was produced pointing at the correct targeted event ID. After construction of theEventBasefor this new event(increate_and_send_nonmember_event()) the newEventBasesredactproperty first reads the key in thecontentobject and returns, which ignores the top-levelredacts. So this mechanism was trying to redact the wrong(and already redacted!) original event per the request.Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.