Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Support for MSC2285 (hidden read receipts) #10413

Merged
merged 26 commits into from
Jul 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
31d023a
Add MSC2285
SimonBrandner Jul 14, 2021
2b28a13
Implement MSC2285
SimonBrandner Jul 15, 2021
c7ff003
Test that hidden read receipts don't break unread counts
SimonBrandner Jul 15, 2021
329ca23
Test that hidden read receipts are hidden
SimonBrandner Jul 15, 2021
5ba7be7
Test filtering of hidden events
SimonBrandner Jul 16, 2021
d11783c
Changelog
SimonBrandner Jul 16, 2021
c352751
Make filter_out_hidden static
SimonBrandner Jul 19, 2021
1dcccd3
Handling of hidden read receipts for initial sync
SimonBrandner Jul 19, 2021
59763c4
Correctly handle hidden=True
SimonBrandner Jul 19, 2021
39f830c
_filters_correctly -> _test_filters_hidden
SimonBrandner Jul 26, 2021
b8ece44
Add an MSC2285_HIDDEN const
SimonBrandner Jul 26, 2021
b90949b
Use correct param name
SimonBrandner Jul 26, 2021
93c87aa
Use 400 for consistency
SimonBrandner Jul 26, 2021
77cd0d8
Add a comment about not using prefixes
SimonBrandner Jul 26, 2021
15eca46
Split out into seperate methods
SimonBrandner Jul 26, 2021
dc4e8ac
Default to hidden = None
SimonBrandner Jul 26, 2021
397ffea
Iterate over both keys and values
SimonBrandner Jul 26, 2021
fa90c66
test_read_receipts -> test_hidden_read_receipts
SimonBrandner Jul 26, 2021
d0d4dc6
Hide MSC2285 behind a feature flag
SimonBrandner Jul 26, 2021
7743ab8
Delint
SimonBrandner Jul 26, 2021
8fd2929
Merge remote-tracking branch 'upstream/develop' into feature/hidden-rrs
SimonBrandner Jul 26, 2021
49dfd1d
Move comment
SimonBrandner Jul 27, 2021
944ee17
Make if statement more readable
SimonBrandner Jul 27, 2021
a02cf57
Move comment to an even better place
SimonBrandner Jul 27, 2021
ee87ab5
Merge branch 'feature/hidden-rrs' of https://github.com/SimonBrandner…
SimonBrandner Jul 27, 2021
f6ba3ac
Update changelog.d/10413.feature
babolivier Jul 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tests/handlers/test_receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

from tests import unittest

# In the first param of _test_filters_hidden we use "hidden" instead of
# ReadReceiptEventFields.MSC2285_HIDDEN. We do this because we're mocking
# the data from the database which doesn't use the prefix

babolivier marked this conversation as resolved.
Show resolved Hide resolved

class ReceiptsTestCase(unittest.HomeserverTestCase):
def prepare(self, reactor, clock, hs):
Expand Down Expand Up @@ -282,12 +286,6 @@ def test_filters_out_receipt_event_with_only_hidden_receipt_and_ignores_rest(sel
],
)

"""
In the first param of _test_filters_hidden we use "hidden" instead of
ReadReceiptEventFields.MSC2285_HIDDEN. We do this because we're mocking
the data from the database which doesn't use the prefix
"""

def _test_filters_hidden(
self, events: List[JsonDict], expected_output: List[JsonDict]
):
Expand Down