comparison src/plugins/plugin_exp_parrot.py @ 663:8004c7d4aba7

core: Deferred in onMessage. onMessage now use a deferred which is passed to MessageReceived trigger through the post_treat parameter. This can be used by plugins to add deferred in the callback chain.
author Goffi <goffi@goffi.org>
date Thu, 31 Oct 2013 17:18:04 +0100
parents 84a6e83157c2
children 0c84fb112d70
comparison
equal deleted inserted replaced
662:4f747d7fde8c 663:8004c7d4aba7
58 # 58 #
59 # if mess_data['to'].userhostJID() in _links.values(): 59 # if mess_data['to'].userhostJID() in _links.values():
60 # debug("Parrot link detected, skipping other triggers") 60 # debug("Parrot link detected, skipping other triggers")
61 # raise SkipOtherTriggers 61 # raise SkipOtherTriggers
62 62
63 def MessageReceivedTrigger(self, message, profile): 63 def MessageReceivedTrigger(self, message, post_treat, profile):
64 """ Check if source is linked and repeat message, else do nothing """ 64 """ Check if source is linked and repeat message, else do nothing """
65 client = self.host.getClient(profile) 65 client = self.host.getClient(profile)
66 from_jid = jid.JID(message["from"]) 66 from_jid = jid.JID(message["from"])
67 67
68 try: 68 try: