plugin OTR: ignore messages from sender without resource or from own jid
This commit is contained in:
parent
6033a0a0cb
commit
6b0847d6aa
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue