mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
minor: Ask for recipient_id, not recipient.
This commit is contained in:
@@ -95,11 +95,11 @@ def save_message_for_edit_use_case(message: Message) -> None:
|
||||
|
||||
|
||||
def user_message_exists_for_topic(user_profile: UserProfile,
|
||||
recipient: Recipient,
|
||||
recipient_id: int,
|
||||
topic_name: str) -> bool:
|
||||
return UserMessage.objects.filter(
|
||||
user_profile=user_profile,
|
||||
message__recipient=recipient,
|
||||
message__recipient_id=recipient_id,
|
||||
message__subject__iexact=topic_name,
|
||||
).exists()
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ def mark_topic_as_read(request: HttpRequest,
|
||||
if topic_name:
|
||||
topic_exists = user_message_exists_for_topic(
|
||||
user_profile=user_profile,
|
||||
recipient=recipient,
|
||||
recipient_id=stream.recipient_id,
|
||||
topic_name=topic_name,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user