Mercurial > libervia-backend
comparison sat_frontends/quick_frontend/quick_app.py @ 3170:39d7327583e1
core: use serialised dict for `extra` in messageNew and historyGet
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 18 Feb 2020 18:13:17 +0100 |
parents | 1cb232c9e845 |
children | 84a94b385760 |
comparison
equal
deleted
inserted
replaced
3169:560642ab1c10 | 3170:39d7327583e1 |
---|---|
757 def newContactHandler(self, jid_s, attributes, groups, profile): | 757 def newContactHandler(self, jid_s, attributes, groups, profile): |
758 entity = jid.JID(jid_s) | 758 entity = jid.JID(jid_s) |
759 groups = list(groups) | 759 groups = list(groups) |
760 self.contact_lists[profile].setContact(entity, groups, attributes, in_roster=True) | 760 self.contact_lists[profile].setContact(entity, groups, attributes, in_roster=True) |
761 | 761 |
762 def messageNewHandler(self, uid, timestamp, from_jid_s, to_jid_s, msg, subject, type_, | 762 def messageNewHandler( |
763 extra, profile): | 763 self, uid, timestamp, from_jid_s, to_jid_s, msg, subject, type_, extra_s, |
764 profile): | |
764 from_jid = jid.JID(from_jid_s) | 765 from_jid = jid.JID(from_jid_s) |
765 to_jid = jid.JID(to_jid_s) | 766 to_jid = jid.JID(to_jid_s) |
767 extra = data_format.deserialise(extra_s) | |
766 if not self.trigger.point( | 768 if not self.trigger.point( |
767 "messageNewTrigger", uid, timestamp, from_jid, to_jid, msg, subject, type_, | 769 "messageNewTrigger", uid, timestamp, from_jid, to_jid, msg, subject, type_, |
768 extra, profile=profile,): | 770 extra, profile=profile,): |
769 return | 771 return |
770 | 772 |