comparison frontends/src/primitivus/chat.py @ 2018:7199e6bdb94e

quick_frontend, primitivus (chat): fixed widget bad locking + don't send notification when locked
author Goffi <goffi@goffi.org>
date Sun, 24 Jul 2016 17:59:24 +0200
parents 20fb71b656e3
children f67da1cab6d3
comparison
equal deleted inserted replaced
2017:7aa58b7a47e2 2018:7199e6bdb94e
440 if self._user_moved(message): 440 if self._user_moved(message):
441 return # no notification for moved messages 441 return # no notification for moved messages
442 442
443 # notifications 443 # notifications
444 444
445 if self._locked:
446 # we don't want notifications when locked
447 # because that's history messages
448 return
449
445 if wid.mess_data.mention: 450 if wid.mess_data.mention:
446 from_jid = wid.mess_data.from_jid 451 from_jid = wid.mess_data.from_jid
447 msg = _(u'You have been mentioned by {nick} in {room}'.format( 452 msg = _(u'You have been mentioned by {nick} in {room}'.format(
448 nick=wid.mess_data.nick, 453 nick=wid.mess_data.nick,
449 room=self.target, 454 room=self.target,