# HG changeset patch # User Goffi # Date 1409938175 -7200 # Node ID 331cb6ea0235b8f4b6421fc5e2b1341472aa3528 # Parent d2bf317b2d28897f18d2d205fc79e2fab049c932 browser side (plugin otr): C.MESS_TYPE_INFO is used instead of "headline" for informational message diff -r d2bf317b2d28 -r 331cb6ea0235 src/browser/sat_browser/plugin_sec_otr.py --- a/src/browser/sat_browser/plugin_sec_otr.py Fri Sep 05 19:29:35 2014 +0200 +++ b/src/browser/sat_browser/plugin_sec_otr.py Fri Sep 05 19:29:35 2014 +0200 @@ -90,7 +90,7 @@ if self.state == otr.context.STATE_ENCRYPTED: log.warning(u"Received unencrypted message in an encrypted context (from %(jid)s)" % {'jid': self.peer.full()}) feedback = _(u"WARNING: received unencrypted data in a supposedly encrypted context"), - self.host.newMessageCb(self.peer, feedback, "headline", self.host.whoami, {}) + self.host.newMessageCb(self.peer, feedback, C.MESS_TYPE_INFO, self.host.whoami, {}) self.host.newMessageCb(self.peer, msg, "chat", self.host.whoami, {}) def sendMessageCb(self, msg, meta=None): @@ -129,7 +129,7 @@ elif msg_state == otr.context.STATE_FINISHED: feedback = _("%s has ended his/her private conversation with you; you should do the same.") - self.host.newMessageCb(self.peer, feedback % other_jid_s, "headline", self.host.whoami, {}) + self.host.newMessageCb(self.peer, feedback % other_jid_s, C.MESS_TYPE_INFO, self.host.whoami, {}) def setCurrentTrust(self, new_trust='', act='asked', type_='trust'): log.debug("setCurrentTrust: trust={trust}, act={act}, type={type}".format(type=type_, trust=new_trust, act=act)) @@ -150,7 +150,7 @@ otr.context.Context.setCurrentTrust(self, new_trust) if old_trust != new_trust: feedback = _("The privacy status of the current conversation is now: {state}").format(state='Private' if new_trust else 'Unverified') - self.host.newMessageCb(self.peer, feedback, "headline", self.host.whoami, {}) + self.host.newMessageCb(self.peer, feedback, C.MESS_TYPE_INFO, self.host.whoami, {}) def fingerprintAuthCb(self): """OTR v2 authentication using manual fingerprint comparison""" @@ -379,7 +379,7 @@ def cb(other_jid): def not_available(): if not finish: - self.host.newMessageCb(other_jid, FEEDBACK_NOT_PRIVATE % other_jid.full(), "headline", self.host.whoami, {}) + self.host.newMessageCb(other_jid, FEEDBACK_NOT_PRIVATE % other_jid.full(), C.MESS_TYPE_INFO, self.host.whoami, {}) priv_key = self.context_manager.account.privkey if priv_key is None: