From bda7116f861e2d3dc06cb1e8914ecac82a07bf06 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 1 Jul 2020 14:50:24 -0700 Subject: [PATCH] message_edit: Reuse delete_event_notify_user_ids. This better describes semantically what we have in mind here -- every user should get one of the two events. --- zerver/lib/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index af7c9d87f9..fc5e273b89 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -4661,8 +4661,8 @@ def do_update_message(user_profile: UserProfile, message: Message, subscribers = subscribers.exclude(user_profile_id__in=[um.user_profile_id for um in ums]) if new_stream is not None: - assert subs_losing_access is not None - subscribers = subscribers.exclude(user_profile_id__in=[sub.user_profile_id for sub in subs_losing_access]) + assert delete_event_notify_user_ids is not None + subscribers = subscribers.exclude(user_profile_id__in=delete_event_notify_user_ids) # All users that are subscribed to the stream must be notified when a message is edited subscribers_ids = [user.user_profile_id for user in subscribers]