mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-18 02:44:20 -05:00
Review comments
This commit is contained in:
parent
7e90fb6a57
commit
f8d21e1431
@ -222,7 +222,8 @@ class BaseHandler(object):
|
|||||||
if event_type == EventTypes.Member
|
if event_type == EventTypes.Member
|
||||||
]
|
]
|
||||||
if len(room_members) == 0:
|
if len(room_members) == 0:
|
||||||
# has the room been created so we can join it?
|
# Have we just created the room, and is this about to be the very
|
||||||
|
# first member event?
|
||||||
create_event = current_state.get(("m.room.create", ""))
|
create_event = current_state.get(("m.room.create", ""))
|
||||||
if create_event:
|
if create_event:
|
||||||
return True
|
return True
|
||||||
|
@ -229,7 +229,7 @@ class MessageHandler(BaseHandler):
|
|||||||
if event.type == EventTypes.Member:
|
if event.type == EventTypes.Member:
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
500,
|
500,
|
||||||
"Tried to send member even through non-member codepath"
|
"Tried to send member event through non-member codepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
user = UserID.from_string(event.sender)
|
user = UserID.from_string(event.sender)
|
||||||
|
@ -490,11 +490,10 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
sender = UserID.from_string(event.sender)
|
sender = UserID.from_string(event.sender)
|
||||||
assert self.hs.is_mine(sender), "Sender must be our own: %s" % (sender,)
|
assert self.hs.is_mine(sender), "Sender must be our own: %s" % (sender,)
|
||||||
|
|
||||||
if event.is_state():
|
message_handler = self.hs.get_handlers().message_handler
|
||||||
message_handler = self.hs.get_handlers().message_handler
|
prev_event = message_handler.deduplicate_state_event(event, context)
|
||||||
prev_event = message_handler.deduplicate_state_event(event, context)
|
if prev_event is not None:
|
||||||
if prev_event is not None:
|
return
|
||||||
return
|
|
||||||
|
|
||||||
action = "send"
|
action = "send"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user