Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

python: Fix identity comparisons for user ID filtering.

Tim Abbottc92b9fba95a4
diff --git a/zerver/lib/message_report.py b/zerver/lib/message_report.py
index 17c0d2d2094..3baf56c8a25 100644
--- a/zerver/lib/message_report.py
+++ b/zerver/lib/message_report.py
@@ -78,7 +78,7 @@ def send_message_report(
[
user
for user in get_display_recipient(reported_message.recipient)
- if user["id"] is not reported_user.id
+ if user["id"] != reported_user.id
]
),
reported_message_date_sent=reported_message_date_sent,
diff --git a/zerver/lib/reminders.py b/zerver/lib/reminders.py
index 12468dcbc88..3be51f3dff9 100644
--- a/zerver/lib/reminders.py
+++ b/zerver/lib/reminders.py
@@ -86,7 +86,7 @@ def get_reminder_formatted_content(
recipients: list[UserProfile | UserDisplayRecipient] = [
user
for user in get_display_recipient(message.recipient)
- if user["id"] is not message.sender.id
+ if user["id"] != message.sender.id
]
if not recipients: