Skip to content

Commit

Permalink
model: Rename 'private' to 'direct' in notifications.
Browse files Browse the repository at this point in the history
This commit replaces the use of 'private' with 'direct' in
notifications when the user sets the 'Include content of direct
messages in desktop notifications' setting to False.

Test updated.

Fixes part of #1288.
  • Loading branch information
theViz343 committed Mar 13, 2023
1 parent e0ed0dd commit 4a31fcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ def test_notify_users_enabled(

@pytest.mark.parametrize(
"hide_content, expected_content",
[(True, "New private message from Foo Foo"), (False, "private content here.")],
[(True, "New direct message from Foo Foo"), (False, "private content here.")],
)
def test_notify_users_hides_PM_content_based_on_user_setting(
self, mocker, model, private_message_fixture, hide_content, expected_content
Expand Down
2 changes: 1 addition & 1 deletion zulipterminal/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ def notify_user(self, message: Message) -> str:
]
recipient = ", ".join(extra_targets)
if not self.user_settings()["pm_content_in_desktop_notifications"]:
content = f"New private message from {message['sender_full_name']}"
content = f"New direct message from {message['sender_full_name']}"
hidden_content = True
elif message["type"] == "stream":
stream_id = message["stream_id"]
Expand Down

0 comments on commit 4a31fcb

Please sign in to comment.