mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
message: Use .is_channel_message column instead of is_stream_message().
This avoids a potential unnecessary message.recipient fetch required by
is_stream_message(). is_stream_message() methods precedes the addition
of the denormalized is_channel_message column and is now unnecessary.
In practice, we usually fetch Message objects with `.recipient` already,
so I don't expect any notable performance impact here - but it's still a
useful change to make.
(cherry picked from commit 51cef01c29)
This commit is contained in:
committed by
Tim Abbott
parent
51711bd3d9
commit
8c9c39059d
@@ -32,7 +32,7 @@ def get_reminder_formatted_content(
|
||||
if note:
|
||||
note = normalize_note_text(note)
|
||||
|
||||
if message.is_stream_message():
|
||||
if message.is_channel_message:
|
||||
# We don't need to check access here since we already have the message
|
||||
# whose access has already been checked by the caller.
|
||||
stream = Stream.objects.get(
|
||||
|
||||
Reference in New Issue
Block a user