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

Commit 16bf01b

Browse files
committed
Add note about extra arg to send_membership_event, remove arg in remote_reject_invite (#6009)
2 parents c5d6fcc + 9c555f3 commit 16bf01b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

changelog.d/6009.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Small refactor of function arguments and docstrings in RoomMemberHandler.

synapse/handlers/room_member.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _remote_join(self, requester, remote_room_hosts, room_id, user, content):
101101
raise NotImplementedError()
102102

103103
@abc.abstractmethod
104-
def _remote_reject_invite(self, remote_room_hosts, room_id, target):
104+
def _remote_reject_invite(self, requester, remote_room_hosts, room_id, target):
105105
"""Attempt to reject an invite for a room this server is not in. If we
106106
fail to do so we locally mark the invite as rejected.
107107
@@ -561,9 +561,7 @@ def _update_membership(
561561
return res
562562

563563
@defer.inlineCallbacks
564-
def send_membership_event(
565-
self, requester, event, context, remote_room_hosts=None, ratelimit=True
566-
):
564+
def send_membership_event(self, requester, event, context, ratelimit=True):
567565
"""
568566
Change the membership status of a user in a room.
569567
@@ -573,16 +571,10 @@ def send_membership_event(
573571
act as the sender, will be skipped.
574572
event (SynapseEvent): The membership event.
575573
context: The context of the event.
576-
is_guest (bool): Whether the sender is a guest.
577-
room_hosts ([str]): Homeservers which are likely to already be in
578-
the room, and could be danced with in order to join this
579-
homeserver for the first time.
580574
ratelimit (bool): Whether to rate limit this request.
581575
Raises:
582576
SynapseError if there was a problem changing the membership.
583577
"""
584-
remote_room_hosts = remote_room_hosts or []
585-
586578
target_user = UserID.from_string(event.state_key)
587579
room_id = event.room_id
588580

0 commit comments

Comments
 (0)