Skip to content

Commit ea7fb47

Browse files
committed
refactor: Replace 'PRIVATE' with 'DIRECT'.
1 parent 3e9ed69 commit ea7fb47

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

tests/ui/test_ui_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ def test_keypress_NEXT_UNREAD_PM_no_pm(
971971

972972
assert return_value == key
973973

974-
@pytest.mark.parametrize("key", keys_for_command("PRIVATE_MESSAGE"))
975-
def test_keypress_PRIVATE_MESSAGE(self, mid_col_view, mocker, key, widget_size):
974+
@pytest.mark.parametrize("key", keys_for_command("DIRECT_MESSAGE"))
975+
def test_keypress_DIRECT_MESSAGE(self, mid_col_view, mocker, key, widget_size):
976976
size = widget_size(mid_col_view)
977977
mocker.patch(MIDCOLVIEW + ".focus_position")
978978
mid_col_view.model.get_next_unread_pm.return_value = None

zulipterminal/config/keys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class KeyBinding(TypedDict):
137137
'help_text': 'New message to a stream',
138138
'key_category': 'open_compose',
139139
},
140-
'PRIVATE_MESSAGE': {
140+
'DIRECT_MESSAGE': {
141141
'keys': ['x'],
142142
'help_text': 'New message to a person or group of people',
143143
'key_category': 'open_compose',

zulipterminal/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def index_messages(messages: List[Message], model: Any, index: Index) -> Index:
381381
'messages': {
382382
# all the messages mapped to their id
383383
# for easy retrieval of message from id
384-
45645: { # PRIVATE
384+
45645: { # DIRECT
385385
'id': 4290,
386386
'timestamp': 1521817473,
387387
'content': 'Hi @**Cordelia Lear**',

zulipterminal/ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def keypress(self, size: urwid_Box, key: str) -> Optional[str]:
262262
or is_command_key("NEXT_UNREAD_TOPIC", key)
263263
or is_command_key("NEXT_UNREAD_PM", key)
264264
or is_command_key("STREAM_MESSAGE", key)
265-
or is_command_key("PRIVATE_MESSAGE", key)
265+
or is_command_key("DIRECT_MESSAGE", key)
266266
):
267267
self.show_left_panel(visible=False)
268268
self.show_right_panel(visible=False)

zulipterminal/ui_tools/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
639639
recipient_emails=[email],
640640
contextual_message_id=dm,
641641
)
642-
elif is_command_key("PRIVATE_MESSAGE", key):
642+
elif is_command_key("DIRECT_MESSAGE", key):
643643
# Create new PM message
644644
self.footer.private_box_view()
645645
self.set_focus("footer")

0 commit comments

Comments
 (0)