primitivus: prevent a notification flood when displaying the history

This commit is contained in:
souliane 2014-08-22 12:31:55 +02:00
commit e72f7d728c

View file

@ -300,7 +300,11 @@ class Chat(urwid.WidgetWrap, QuickChat):
break
else:
self.content.append(new_text)
self._notify(from_jid, msg)
if not timestamp:
# XXX: do not send notifications for each line of the history being displayed
# FIXME: this must be changed in the future if the timestamp is passed with
# all messages and not only with the messages coming from the history.
self._notify(from_jid, msg)
def printInfo(self, msg, type_='normal', timestamp=""):
"""Print general info