Add events for bot avatar_url changes

(imported from commit c058386ce5ef9d89165c44fd853808cfe1f625f4)
This commit is contained in:
Jason Michalski
2014-02-26 15:05:10 -05:00
parent 280575aff0
commit 3772344e2d
2 changed files with 14 additions and 0 deletions

View File

@@ -1349,6 +1349,13 @@ def do_change_avatar_source(user_profile, avatar_source, log=True):
'user': user_profile.email,
'avatar_source': avatar_source})
if user_profile.is_bot:
send_event(dict(type='realm_bot',
op='update',
bot=dict(email=user_profile.email,
avatar_url=avatar_url(user_profile),)),
bot_owner_userids(user_profile))
def _default_stream_permision_check(user_profile, stream):
# Any user can have a None default stream
if stream is not None: