comparison src/plugins/plugin_xep_0033.py @ 1374:0befb14ecf62

renamed tools.misc to tools.trigger
author Goffi <goffi@goffi.org>
date Thu, 19 Mar 2015 19:44:37 +0100
parents 3e234902177a
children 069ad98b360d
comparison
equal deleted inserted replaced
1373:6d0e01809893 1374:0befb14ecf62
31 except ImportError: 31 except ImportError:
32 from wokkel.subprotocols import XMPPHandler 32 from wokkel.subprotocols import XMPPHandler
33 from twisted.words.xish import domish 33 from twisted.words.xish import domish
34 from twisted.internet import defer 34 from twisted.internet import defer
35 35
36 from sat.tools.misc import TriggerManager 36 from sat.tools import trigger
37 from time import time 37 from time import time
38 38
39 # TODO: fix Prosody "addressing" plugin to leave the concerned bcc according to the spec: 39 # TODO: fix Prosody "addressing" plugin to leave the concerned bcc according to the spec:
40 # 40 #
41 # http://xmpp.org/extensions/xep-0033.html#addr-type-bcc 41 # http://xmpp.org/extensions/xep-0033.html#addr-type-bcc
70 """ 70 """
71 def __init__(self, host): 71 def __init__(self, host):
72 log.info(_("Extended Stanza Addressing plugin initialization")) 72 log.info(_("Extended Stanza Addressing plugin initialization"))
73 self.host = host 73 self.host = host
74 self.internal_data = {} 74 self.internal_data = {}
75 host.trigger.add("sendMessage", self.sendMessageTrigger, TriggerManager.MIN_PRIORITY) 75 host.trigger.add("sendMessage", self.sendMessageTrigger, trigger.TriggerManager.MIN_PRIORITY)
76 host.trigger.add("MessageReceived", self.messageReceivedTrigger) 76 host.trigger.add("MessageReceived", self.messageReceivedTrigger)
77 77
78 def sendMessageTrigger(self, mess_data, pre_xml_treatments, post_xml_treatments, profile): 78 def sendMessageTrigger(self, mess_data, pre_xml_treatments, post_xml_treatments, profile):
79 """Process the XEP-0033 related data to be sent""" 79 """Process the XEP-0033 related data to be sent"""
80 80