mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +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,
|
def user_message_exists_for_topic(user_profile: UserProfile,
|
||||||
recipient: Recipient,
|
recipient_id: int,
|
||||||
topic_name: str) -> bool:
|
topic_name: str) -> bool:
|
||||||
return UserMessage.objects.filter(
|
return UserMessage.objects.filter(
|
||||||
user_profile=user_profile,
|
user_profile=user_profile,
|
||||||
message__recipient=recipient,
|
message__recipient_id=recipient_id,
|
||||||
message__subject__iexact=topic_name,
|
message__subject__iexact=topic_name,
|
||||||
).exists()
|
).exists()
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ def mark_topic_as_read(request: HttpRequest,
|
|||||||
if topic_name:
|
if topic_name:
|
||||||
topic_exists = user_message_exists_for_topic(
|
topic_exists = user_message_exists_for_topic(
|
||||||
user_profile=user_profile,
|
user_profile=user_profile,
|
||||||
recipient=recipient,
|
recipient_id=stream.recipient_id,
|
||||||
topic_name=topic_name,
|
topic_name=topic_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user