Send user_id to the client when removing bots/users.

This touches these events:

    realm_bot/remove
    realm_user/remove
This commit is contained in:
Steve Howell
2016-10-25 19:52:10 -07:00
committed by Tim Abbott
parent 7883cecf28
commit 3fd7ab950a

View File

@@ -513,12 +513,14 @@ def do_deactivate_user(user_profile, log=True, _cascade=True):
event = dict(type="realm_user", op="remove", event = dict(type="realm_user", op="remove",
person=dict(email=user_profile.email, person=dict(email=user_profile.email,
user_id=user_profile.id,
full_name=user_profile.full_name)) full_name=user_profile.full_name))
send_event(event, active_user_ids(user_profile.realm)) send_event(event, active_user_ids(user_profile.realm))
if user_profile.is_bot: if user_profile.is_bot:
event = dict(type="realm_bot", op="remove", event = dict(type="realm_bot", op="remove",
bot=dict(email=user_profile.email, bot=dict(email=user_profile.email,
user_id=user_profile.id,
full_name=user_profile.full_name)) full_name=user_profile.full_name))
send_event(event, bot_owner_userids(user_profile)) send_event(event, bot_owner_userids(user_profile))