actions: Use presence_disabled for presence zephyr_mirror code path.

This is part of the effort to remove the use of is_zephyr_mirror_realm
across the code path for situations that might be relevant for other
users.  It helps keep the code readable.
This commit is contained in:
Tim Abbott
2018-04-20 11:55:29 -07:00
parent 09f995e966
commit dc6d7d0d12

View File

@@ -3315,7 +3315,7 @@ def do_update_user_presence(user_profile: UserProfile,
update_fields.append("status") update_fields.append("status")
presence.save(update_fields=update_fields) presence.save(update_fields=update_fields)
if not user_profile.realm.is_zephyr_mirror_realm and (created or became_online): if not user_profile.realm.presence_disabled and (created or became_online):
# Push event to all users in the realm so they see the new user # Push event to all users in the realm so they see the new user
# appear in the presence list immediately, or the newly online # appear in the presence list immediately, or the newly online
# user without delay. Note that we won't send an update here for a # user without delay. Note that we won't send an update here for a