Skip to content

Commit 4b7ca4b

Browse files
committed
notifications on reply
1 parent 10ef786 commit 4b7ca4b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ncTelegram/msg_receiver.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,21 @@ def get_dump(self):
6666

6767
# notif on hl
6868
if 'text' in msg and 'username' in self.Telegram_ui.me and \
69-
"@" + self.Telegram_ui.me['username'] in msg['text']:
69+
"@" + self.Telegram_ui.me['username'] in msg['text']:
7070
self.Telegram_ui.display_notif(msg)
7171

72+
#notif on reply
73+
if 'reply_id' in msg and 'text' in msg:
74+
msg_reply = self.Telegram_ui.sender.message_get(msg['reply_id'])
75+
if ('from' in msg_reply and\
76+
msg_reply['from']['id'] == self.Telegram_ui.me['id']) or \
77+
('sender' in msg_reply and\
78+
msg_reply['sender']['id'] == self.Telegram_ui.me['id']):
79+
self.Telegram_ui.display_notif(msg)
80+
81+
82+
83+
7284
self.Telegram_ui.update_read_status(msg_cmd, False)
7385
# refresh of the screen
7486
self.Telegram_ui.main_loop.draw_screen()

0 commit comments

Comments
 (0)