diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2021-10-20 18:13:51 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2021-10-20 18:23:56 +0100 |
commit | 95a49727a6807e716a2386c6d0b167f29f5f8c9a (patch) | |
tree | 526b35a2b7bdbe25e53d530f82cfa1b3ec6a8a8f | |
parent | newsfile (diff) | |
download | synapse-github/anoa/e2e_as_new.tar.xz |
Note that AS interest via room ID or alias isn't respected github/anoa/e2e_as_new anoa/e2e_as_new
Typing and read receipt events (those that are associated with a room) should be sent to an AS that has registered interest in that room, according to MSC2409: https://github.com/Sorunome/matrix-doc/blob/231084da132af6518ecefa2a42c37937dfe373d2/proposals/2409-appservice-edus.md#expectations-of-when-an-edu-should-be-pushed-to-an-appservice
-rw-r--r-- | synapse/handlers/receipts.py | 4 | ||||
-rw-r--r-- | synapse/handlers/typing.py | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py index 4911a11535..9fe980e72a 100644 --- a/synapse/handlers/receipts.py +++ b/synapse/handlers/receipts.py @@ -267,6 +267,10 @@ class ReceiptEventSource(EventSource[int, JsonDict]): ) # Then filter down to rooms that the AS can read + # TODO: This doesn't seem to honour an appservice's registration of room or + # namespace aliases. For instance, if an appservice registered a room namespace + # that matched this room, but it didn't have any members in the room, then that + # appservice wouldn't receive the read receipt. events = [] for room_id, event in rooms_to_events.items(): if not await service.matches_user_in_member_list(room_id, self.store): diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 662ea59d42..7290eecfa1 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -481,6 +481,11 @@ class TypingNotificationEventSource(EventSource[int, JsonDict]): for room_id in handler._room_serials.keys(): if handler._room_serials[room_id] <= from_key: continue + + # TODO: This doesn't seem to honour an appservice's registration of room or + # namespace aliases. For instance, if an appservice registered a room namespace + # that matched this room, but it didn't have any members in the room, then that + # appservice wouldn't receive the typing event. if not await service.matches_user_in_member_list( room_id, handler.store ): |