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

Commit 95a4972

Browse files
committed
Note that AS interest via room ID or alias isn't respected
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
1 parent 1df714c commit 95a4972

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

synapse/handlers/receipts.py

+4
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ async def get_new_events_as(
267267
)
268268

269269
# Then filter down to rooms that the AS can read
270+
# TODO: This doesn't seem to honour an appservice's registration of room or
271+
# namespace aliases. For instance, if an appservice registered a room namespace
272+
# that matched this room, but it didn't have any members in the room, then that
273+
# appservice wouldn't receive the read receipt.
270274
events = []
271275
for room_id, event in rooms_to_events.items():
272276
if not await service.matches_user_in_member_list(room_id, self.store):

synapse/handlers/typing.py

+5
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ async def get_new_events_as(
481481
for room_id in handler._room_serials.keys():
482482
if handler._room_serials[room_id] <= from_key:
483483
continue
484+
485+
# TODO: This doesn't seem to honour an appservice's registration of room or
486+
# namespace aliases. For instance, if an appservice registered a room namespace
487+
# that matched this room, but it didn't have any members in the room, then that
488+
# appservice wouldn't receive the typing event.
484489
if not await service.matches_user_in_member_list(
485490
room_id, handler.store
486491
):

0 commit comments

Comments
 (0)