Skip to content

Commit

Permalink
notifications on reply
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanoseb committed Mar 28, 2016
1 parent 10ef786 commit 4b7ca4b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ncTelegram/msg_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,21 @@ def get_dump(self):

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

#notif on reply
if 'reply_id' in msg and 'text' in msg:
msg_reply = self.Telegram_ui.sender.message_get(msg['reply_id'])
if ('from' in msg_reply and\
msg_reply['from']['id'] == self.Telegram_ui.me['id']) or \
('sender' in msg_reply and\
msg_reply['sender']['id'] == self.Telegram_ui.me['id']):
self.Telegram_ui.display_notif(msg)




self.Telegram_ui.update_read_status(msg_cmd, False)
# refresh of the screen
self.Telegram_ui.main_loop.draw_screen()
Expand Down

0 comments on commit 4b7ca4b

Please sign in to comment.