diff --git a/sat/plugins/plugin_sec_otr.py b/sat/plugins/plugin_sec_otr.py index 5c99d25c..2db01c0b 100644 --- a/sat/plugins/plugin_sec_otr.py +++ b/sat/plugins/plugin_sec_otr.py @@ -733,6 +733,10 @@ class OTR(object): if message_elt.getAttribute("type") == C.MESS_TYPE_GROUPCHAT: # OTR is not possible in group chats return True + from_jid = jid.JID(message_elt['from']) + if not from_jid.resource or from_jid.userhostJID() == client.jid.userhostJID(): + # OTR is only usable when resources are present + return True if client.profile in self.skipped_profiles: post_treat.addCallback(self._receivedTreatmentForSkippedProfiles) else: