push-notifications: Update strings for private messages.

Updates strings with "private message" in push notifications to
use "direct message" instead.
This commit is contained in:
Lauryn Menard
2023-01-24 15:38:23 +01:00
committed by Tim Abbott
parent a0fd7b2afc
commit 182e6c0730
2 changed files with 3 additions and 3 deletions

View File

@@ -661,12 +661,12 @@ def get_gcm_alert(
message.recipient.type == Recipient.HUDDLE
and trigger == NotificationTriggers.PRIVATE_MESSAGE
):
return f"New private group message from {sender_str}"
return f"New direct group message from {sender_str}"
elif (
message.recipient.type == Recipient.PERSONAL
and trigger == NotificationTriggers.PRIVATE_MESSAGE
):
return f"New private message from {sender_str}"
return f"New direct message from {sender_str}"
elif message.is_stream_message() and trigger == NotificationTriggers.MENTION:
if mentioned_user_group_name is None:
return f"{sender_str} mentioned you in #{display_recipient}"

View File

@@ -2070,7 +2070,7 @@ class TestGetGCMPayload(PushNotificationTest):
{
"user_id": hamlet.id,
"event": "message",
"alert": "New private message from King Hamlet",
"alert": "New direct message from King Hamlet",
"zulip_message_id": message.id,
"time": datetime_to_timestamp(message.date_sent),
"content": message.content,