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

Improve docstrings for methods related to sending EDUs to application services #11138

Merged
merged 16 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 4 additions & 0 deletions synapse/handlers/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ async def get_new_events_as(
)

# 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.
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't and should is the implication of this?

events = []
for room_id, event in rooms_to_events.items():
if not await service.matches_user_in_member_list(room_id, self.store):
Expand Down
5 changes: 5 additions & 0 deletions synapse/handlers/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@ async def get_new_events_as(
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
):
Expand Down