Mercurial > libervia-backend
changeset 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 (2014-08-22) |
parents | 5968fd8d2248 |
children | 64ff259d3cbb |
files | frontends/src/primitivus/chat.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
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