# HG changeset patch # User souliane # Date 1408703515 -7200 # Node ID d1f6b927131e4612430d86a88bfe81e0be05af83 # Parent 5968fd8d2248b2b305fee4c294e5bc82dbe716ef primitivus: prevent a notification flood when displaying the history diff -r 5968fd8d2248 -r d1f6b927131e frontends/src/primitivus/chat.py --- a/frontends/src/primitivus/chat.py Sat Aug 23 20:11:37 2014 +0200 +++ b/frontends/src/primitivus/chat.py Fri Aug 22 12:31:55 2014 +0200 @@ -300,7 +300,11 @@ 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