comparison sat_frontends/quick_frontend/quick_chat.py @ 2839:76f714b12d21

quick frontend(chat): use bare jid for getEncryptionState, and skip if for group chat
author Goffi <goffi@goffi.org>
date Sun, 03 Mar 2019 20:59:29 +0100
parents 4a05e67a8025
children c055a3a4ecb0
comparison
equal deleted inserted replaced
2838:8018cf9aa55b 2839:76f714b12d21
565 """Retrieve encryption state with current target. 565 """Retrieve encryption state with current target.
566 566
567 Once state is retrieved, default messageEncryptionStarted will be called if 567 Once state is retrieved, default messageEncryptionStarted will be called if
568 suitable 568 suitable
569 """ 569 """
570 self.host.bridge.messageEncryptionGet(unicode(self.target), self.profile, 570 if self.type == C.CHAT_GROUP:
571 return
572 self.host.bridge.messageEncryptionGet(unicode(self.target.bare), self.profile,
571 callback=self.messageEncryptionGetCb, 573 callback=self.messageEncryptionGetCb,
572 errback=self.messageEncryptionGetEb) 574 errback=self.messageEncryptionGetEb)
573 575
574 576
575 def messageNew(self, uid, timestamp, from_jid, to_jid, msg, subject, type_, extra, 577 def messageNew(self, uid, timestamp, from_jid, to_jid, msg, subject, type_, extra,