mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 10:33:54 +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.
This commit is contained in:
committed by
Tim Abbott
parent
4e3ec77a0f
commit
51cef01c29
@@ -59,7 +59,7 @@ def send_message_report(
|
||||
last_user_mention=last_user_mention,
|
||||
)
|
||||
else:
|
||||
assert reported_message.is_stream_message() is True
|
||||
assert reported_message.is_channel_message is True
|
||||
topic_name = reported_message.topic_name()
|
||||
channel_id = reported_message.recipient.type_id
|
||||
channel_name = reported_message.recipient.label()
|
||||
|
||||
Reference in New Issue
Block a user