Mercurial > libervia-backend
diff frontends/src/primitivus/chat.py @ 1120:d1f6b927131e
primitivus: prevent a notification flood when displaying the history
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 22 Aug 2014 12:31:55 +0200 |
parents | e2e1e27a3680 |
children | d6c3fea5ecfe |
line wrap: on
line diff
--- 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