Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_chat.py @ 669:ffb716804580
core, bridge: extra parameter is saved in history:
- added extra data in getHistory return value
- extra data is saved in database
/!\ WARNING: DATABASE SCHEMA HAS CHANGED /!\
to update sqlite database: ALTER TABLE history ADD COLUMN extra BLOB;
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 07 Nov 2013 15:29:39 +0100 |
parents | 84a6e83157c2 |
children | 0b9bd47dffcd |
comparison
equal
deleted
inserted
replaced
668:7bb50096d225 | 669:ffb716804580 |
---|---|
96 def historyPrint(self, size=20, profile='@NONE@'): | 96 def historyPrint(self, size=20, profile='@NONE@'): |
97 """Print the initial history""" | 97 """Print the initial history""" |
98 debug (_("now we print history")) | 98 debug (_("now we print history")) |
99 def onHistory(history): | 99 def onHistory(history): |
100 for line in history: | 100 for line in history: |
101 timestamp, from_jid, to_jid, message, _type = line | 101 timestamp, from_jid, to_jid, message, _type, extra = line |
102 if ((self.type == 'group' and _type != 'groupchat') or | 102 if ((self.type == 'group' and _type != 'groupchat') or |
103 (self.type == 'one2one' and _type == 'groupchat')): | 103 (self.type == 'one2one' and _type == 'groupchat')): |
104 continue | 104 continue |
105 self.printMessage(JID(from_jid), message, profile, timestamp) | 105 self.printMessage(JID(from_jid), message, profile, timestamp) |
106 | 106 |