Skip to content

Commit 7c79724

Browse files
committed
feat(model): show desktop notifications for enabled streams
* Linked to #666 (probably only a partial fix so far)
1 parent 6315653 commit 7c79724

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zulipterminal/model.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,10 @@ def notify_user(self, message: Message) -> str:
671671
]
672672
target = ', '.join(extra_targets)
673673
recipient = ' (to {})'.format(target)
674-
elif {'mentioned', 'wildcard_mentioned'}.intersection(
675-
set(message['flags'])) and message['type'] == 'stream':
674+
elif message['type'] == 'stream' and (
675+
{'mentioned', 'wildcard_mentioned'}.intersection(set(message['flags']))
676+
or self.stream_dict[message['stream_id']]['desktop_notifications']
677+
):
676678
recipient = ' (to {} -> {})'.format(message['display_recipient'],
677679
message['subject'])
678680

0 commit comments

Comments
 (0)