Ignore the resource

This commit is contained in:
Bohdan Horbeshko 2022-10-28 00:35:29 +03:00
parent 247602d0f7
commit 1d1873661e

4
otr.py
View file

@ -127,7 +127,7 @@ class OTR(context.Account):
# decrypt message
def decrypt(self,stanza,properties):
peer = stanza.getFrom()
peer = stanza.getFrom().new_as_bare()
msgtxt = stanza.getBody()
channel, ctl = self.getContext(peer), self.getControl(peer)
try:
@ -143,7 +143,7 @@ class OTR(context.Account):
# encrypt message
def encrypt(self,event,callback):
peer = event.msg_iq.getTo()
peer = event.msg_iq.getTo().new_as_bare()
channel, ctl = self.getContext(peer), event.control
if event.xhtml: return ctl.send_message(event.message) # skip xhtml messages
try: