This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Remove the ability to query relations when the original event was redacted. #5629
Remove the ability to query relations when the original event was redacted. #5629
Changes from 12 commits
3e9e100
d6c89b5
f351013
0350589
5bc5d60
6e015df
7eb0608
ae919fc
498a3bb
2d4cbc0
c0649be
06267e0
fe23482
f8e8e21
b91bc62
f119a9d
edb36b5
432c041
509a612
036ab09
4367853
72a9675
b335613
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like it is only handling the 5 most recent edits of an event. is that deliberate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to hit the ratelimiter, and then the whole request will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this pattern used anywhere else? I'm not sure it is the best way to check if an event is redacted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure either, but it is used elsewhere.
synapse/tests/storage/test_redaction.py
Line 135 in 32e7c9e
Might be best to create a method
is_event_redacted
, though not sure how it would check that otherwise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has now been replaced with
internal_metadata
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm struggling to understand the existing behaviour here (get_relations_for_event returns a pagination structure, which we then overwrite with different contents?), but it seems to return an
original_event
, which I can't find mentioned in the MSC. It's therefore hard to know if it is safe to not return it in this case.I'm generally rather uneasy about unspecced behaviour which clients will come to rely on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
original_event
came from #5626 which lead to a comment on the rewrite MSC here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After replacing things with
PaginationChunk
,original_event
is now included in the response whether the event is redacted or not.Not including it was an oversight on my part.