Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
1119:5968fd8d2248 | 1120:d1f6b927131e |
---|---|
298 | 298 |
299 self.content.insert(idx + 1, new_text) | 299 self.content.insert(idx + 1, new_text) |
300 break | 300 break |
301 else: | 301 else: |
302 self.content.append(new_text) | 302 self.content.append(new_text) |
303 self._notify(from_jid, msg) | 303 if not timestamp: |
304 # XXX: do not send notifications for each line of the history being displayed | |
305 # FIXME: this must be changed in the future if the timestamp is passed with | |
306 # all messages and not only with the messages coming from the history. | |
307 self._notify(from_jid, msg) | |
304 | 308 |
305 def printInfo(self, msg, type_='normal', timestamp=""): | 309 def printInfo(self, msg, type_='normal', timestamp=""): |
306 """Print general info | 310 """Print general info |
307 @param msg: message to print | 311 @param msg: message to print |
308 @type_: one of: | 312 @type_: one of: |