d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
647 stars 45 forks source link

add terminal bell for new messages in currently active chat #11

Closed d99kris closed 4 years ago

d99kris commented 4 years ago

from issue #8

Send Terminal bell (control-G) for messages in chat that has focus - in nchat if the chat has focus, its greedy and marks the message as read even if the app does not have focus - denying the user notification that they got a message if its running in the background

d99kris commented 4 years ago

Terminal bell notification for new messages has been added. It's configurable to be completely disabled, enabled only for current chat, or enabled for new messages in any chat. The current default is to be enabled for new messages in any chat. Relevant configuration parameters in ~/.nchat/uidefault.conf:

bell_msg_any_chat=1
bell_msg_current_chat=0
alohawolf commented 4 years ago

I'd suggest that the bell_msg_any_chat should respect existing notification settings as set via other telegram clients - or a third setting can be added for that

d99kris commented 4 years ago

Thanks for catching @alohawolf - added a fix so nchat respects the notification setting.

alohawolf commented 4 years ago

How does this deal with @username mentions?

d99kris commented 4 years ago

How does this deal with @username mentions?

No special treatment with respect to mentions in muted conversations (i.e. no bell). It's kind of consistent with the Telegram mobile app, which also wont show phone notifications for the same situation (I think).

alohawolf commented 4 years ago

telegram will notify on an @username mention even if group chat notifications are turned off

On Thu, Oct 3, 2019 at 5:37 AM Kristofer Berggren notifications@github.com wrote:

How does this deal with @username mentions? No special treatment with respect to mentions in muted conversations (i.e. no bell). It's kind of consistent with the Telegram mobile app, which also wont show phone notifications for the same situation (I think).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/d99kris/nchat/issues/11?email_source=notifications&email_token=AEZUAGMBMIF4UB42YAD4L23QMXDPZA5CNFSM4IZ6LPZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAHYVEY#issuecomment-537889427, or mute the thread https://github.com/notifications/unsubscribe-auth/AEZUAGOMWQ6TON6XPMBSJR3QMXDPZANCNFSM4IZ6LPZA .

d99kris commented 4 years ago

Looks like you're correct! My device didn't behave like this the other day for some reason.

Anyway, nchat does not support this currently. Feel free to open an issue if you'd like to see this supported, and I'll see what can be done.