From 1d1873661e544fb288bb9fa58486e076c99285f2 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Fri, 28 Oct 2022 00:35:29 +0300 Subject: [PATCH] Ignore the resource --- otr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/otr.py b/otr.py index 1a8e9cf..f878a79 100644 --- a/otr.py +++ b/otr.py @@ -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: