s/join/joined/ in notify_user_membership_change
parent
3f0f06cb31
commit
62ad701326
|
@ -73,7 +73,7 @@ class RoomMemberWorkerHandler(RoomMemberHandler):
|
||||||
port=self.config.worker_replication_http_port,
|
port=self.config.worker_replication_http_port,
|
||||||
user_id=target.to_string(),
|
user_id=target.to_string(),
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
change="join",
|
change="joined",
|
||||||
)
|
)
|
||||||
|
|
||||||
def _user_left_room(self, target, room_id):
|
def _user_left_room(self, target, room_id):
|
||||||
|
|
|
@ -154,7 +154,7 @@ def notify_user_membership_change(client, host, port, user_id, room_id, change):
|
||||||
Returns:
|
Returns:
|
||||||
Deferred
|
Deferred
|
||||||
"""
|
"""
|
||||||
assert change in ("join", "left")
|
assert change in ("joined", "left")
|
||||||
|
|
||||||
uri = "http://%s:%s/_synapse/replication/user_%s_room" % (host, port, change)
|
uri = "http://%s:%s/_synapse/replication/user_%s_room" % (host, port, change)
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ class ReplicationRegister3PIDGuestRestServlet(RestServlet):
|
||||||
|
|
||||||
|
|
||||||
class ReplicationUserJoinedLeftRoomRestServlet(RestServlet):
|
class ReplicationUserJoinedLeftRoomRestServlet(RestServlet):
|
||||||
PATTERNS = [re.compile("^/_synapse/replication/user_(?P<change>join|left)_room$")]
|
PATTERNS = [re.compile("^/_synapse/replication/user_(?P<change>joined|left)_room$")]
|
||||||
|
|
||||||
def __init__(self, hs):
|
def __init__(self, hs):
|
||||||
super(ReplicationUserJoinedLeftRoomRestServlet, self).__init__()
|
super(ReplicationUserJoinedLeftRoomRestServlet, self).__init__()
|
||||||
|
@ -317,7 +317,7 @@ class ReplicationUserJoinedLeftRoomRestServlet(RestServlet):
|
||||||
|
|
||||||
user = UserID.from_string(user_id)
|
user = UserID.from_string(user_id)
|
||||||
|
|
||||||
if change == "join":
|
if change == "joined":
|
||||||
user_joined_room(self.distributor, user, room_id)
|
user_joined_room(self.distributor, user, room_id)
|
||||||
elif change == "left":
|
elif change == "left":
|
||||||
user_left_room(self.distributor, user, room_id)
|
user_left_room(self.distributor, user, room_id)
|
||||||
|
|
Loading…
Reference in New Issue