Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_edit: Clarify name for gaining_usermessage_user_ids.
Tim Abbott71e57d2022f6
diff --git a/zerver/actions/message_edit.py b/zerver/actions/message_edit.pyindex 85350b65d16..41aac51d2e7 100644--- a/zerver/actions/message_edit.py+++ b/zerver/actions/message_edit.py@@ -542,13 +542,13 @@ def do_update_message(user_profile_id__in=[sub.user_profile_id for sub in subs_losing_usermessages])- subs_gaining_usermessages = []+ gaining_usermessage_user_ids = []if not new_stream.is_history_public_to_subscribers():# For private streams, with history not public to subscribers,# We find out users who are not present in the msgs' old stream# and create new UserMessage for these users so that they can# access this message.- subs_gaining_usermessages += [+ gaining_usermessage_user_ids += [user_id for user_id in new_stream_user_ids if user_id not in old_stream_user_ids]@@ -620,10 +620,10 @@ def do_update_message(assert stream_being_edited is not Nonechanged_message_ids = [msg.id for msg in changed_messages]- if subs_gaining_usermessages:+ if gaining_usermessage_user_ids:ums_to_create = []for message_id in changed_message_ids:- for user_profile_id in subs_gaining_usermessages:+ for user_profile_id in gaining_usermessage_user_ids:# The fact that the user didn't have a UserMessage originally means we can infer that the user# was not mentioned in the original message (even if mention syntax was present, it would not# take effect for a user who was not subscribed). If we were editing the message's content, we