mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
Change our_person() in apply_events() to use user_id.
This is a pretty minor change, but it makes it clear that we have user_id in all the relevant states/events, so we might as well use that for the check, since email is mutable and slightly more difficult to reason about.
This commit is contained in:
@@ -3178,7 +3178,7 @@ def apply_events(state, events, user_profile):
|
|||||||
|
|
||||||
def our_person(p):
|
def our_person(p):
|
||||||
# type: (Dict[str, Any]) -> bool
|
# type: (Dict[str, Any]) -> bool
|
||||||
return p['email'] == person['email']
|
return p['user_id'] == person['user_id']
|
||||||
|
|
||||||
if event['op'] == "add":
|
if event['op'] == "add":
|
||||||
state['realm_users'].append(person)
|
state['realm_users'].append(person)
|
||||||
|
|||||||
Reference in New Issue
Block a user