Skip to content

Commit

Permalink
fix notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanoseb committed Mar 29, 2016
1 parent 47ae3ca commit 70c66dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions ncTelegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ def display_notif(self, msg):
if self.conf['general']['notification']:
text = msg['text']

try:
sender = msg['to']['title'] + ": " + msg['from']['first_name']
except:
sender = msg['from']['first_name']
if msg['receiver']['type'] == 'user':
sender = msg['sender']['first_name']
else:
sender = msg['receiver']['name'] + ": " + msg['sender']['first_name']


Notify.Notification.new('', '<b>' + sender + '</b>\n' + text, self.image).show()

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from distutils.core import setup

setup(name='ncTelegram',
version='0.9.1',
version='0.9.3',
description='A curse Telegram client',
license='GPLv3',
author='Sébastien Lemaire',
Expand All @@ -12,6 +12,6 @@
scripts=['nctelegram'],
data_files=[('/etc', ['ncTelegram.conf']),
('/usr/share/ncTelegram', ['t_logo.png']),],
install_requires=["pytg==0.4.5"]
install_requires=["pytg>=0.4.6"]

)

0 comments on commit 70c66dd

Please sign in to comment.