Skip to content

Commit

Permalink
Revert "Remove unnecessary arguments from knocking _serialize_payload…
Browse files Browse the repository at this point in the history
… functions"

This reverts commit 3fb055c. It was found that
these arguments are necessary and nice to keep around following a discussion
in matrix-org#8809.
  • Loading branch information
anoadragon453 committed Nov 26, 2020
1 parent 50354ef commit 7c09796
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions synapse/replication/http/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,17 @@ def __init__(self, hs):

@staticmethod
async def _serialize_payload( # type: ignore
requester: Requester, remote_room_hosts: List[str], content: JsonDict,
requester: Requester,
room_id: str,
user_id: str,
remote_room_hosts: List[str],
content: JsonDict,
):
"""
Args:
requester: The user making the request, according to the access token.
room_id: The ID of the room to knock on.
user_id: The ID of the knocking user.
remote_room_hosts: Servers to try and send the knock via.
content: The event content to use for the knock event.
"""
Expand Down Expand Up @@ -239,10 +245,14 @@ def __init__(self, hs: "HomeServer"):

@staticmethod
async def _serialize_payload( # type: ignore
txn_id: Optional[str], requester: Requester, content: JsonDict,
knock_event_id: str,
txn_id: Optional[str],
requester: Requester,
content: JsonDict,
):
"""
Args:
knock_event_id: The ID of the knock to be rescinded.
txn_id: An optional transaction ID supplied by the client.
requester: The user making the rescind request, according to the access token.
content: The content to include in the rescind event.
Expand Down

0 comments on commit 7c09796

Please sign in to comment.