Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -24,7 +24,7 @@ from twisted.words.protocols.jabber import jid
|
|||
|
||||
|
||||
from sat.core.exceptions import UnknownEntityError
|
||||
from sat.tools.misc import SkipOtherTriggers
|
||||
from sat.tools.misc import SkipOtherTriggers
|
||||
|
||||
PLUGIN_INFO = {
|
||||
"name": "Parrot Plugin",
|
||||
|
|
@ -57,28 +57,28 @@ class Exp_Parrot():
|
|||
# _links = client.parrot_links
|
||||
# except AttributeError:
|
||||
# return True
|
||||
#
|
||||
#
|
||||
# if mess_data['to'].userhostJID() in _links.values():
|
||||
# debug("Parrot link detected, skipping other triggers")
|
||||
# raise SkipOtherTriggers
|
||||
# raise SkipOtherTriggers
|
||||
|
||||
def MessageReceivedTrigger(self, message, profile):
|
||||
""" Check if source is linked and repeat message, else do nothing """
|
||||
client = self.host.getClient(profile)
|
||||
from_jid = jid.JID(message["from"])
|
||||
|
||||
|
||||
try:
|
||||
_links = client.parrot_links
|
||||
except AttributeError:
|
||||
return True
|
||||
|
||||
|
||||
if not from_jid.userhostJID() in _links:
|
||||
return True
|
||||
|
||||
|
||||
for e in message.elements():
|
||||
if e.name == "body":
|
||||
mess_body = e.children[0] if e.children else ""
|
||||
|
||||
|
||||
try:
|
||||
entity_type = self.host.memory.getEntityData(from_jid, ['type'], profile)["type"]
|
||||
except (UnknownEntityError, KeyError):
|
||||
|
|
@ -97,7 +97,7 @@ class Exp_Parrot():
|
|||
self.host.sendMessage(unicode(linked), msg, None, "auto", profile_key=profile)
|
||||
else:
|
||||
warning("No body element found in message, following normal behaviour")
|
||||
|
||||
|
||||
return True
|
||||
|
||||
def addParrot(self, source_jid, dest_jid, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue