comparison src/core/xmpp.py @ 697:0c84fb112d70

core: sendMessage triggers now use a treatments deferred; - treaments deferred can be used by plugins to change XML elements before sending them, in a similar way as for newMessage - sendMessageXml trigger became useless, so it as been removed in favor of the new deferred
author Goffi <goffi@goffi.org>
date Wed, 13 Nov 2013 13:57:36 +0100
parents ffb716804580
children ade9997fabfa
comparison
equal deleted inserted replaced
696:f1a2831d549d 697:0c84fb112d70
110 xmppim.MessageProtocol.__init__(self) 110 xmppim.MessageProtocol.__init__(self)
111 self.host = host 111 self.host = host
112 112
113 def onMessage(self, message): 113 def onMessage(self, message):
114 debug(_(u"got message from: %s"), message["from"]) 114 debug(_(u"got message from: %s"), message["from"])
115 post_treat = defer.Deferred() # XXX: plugin can add there treatments to this deferred 115 post_treat = defer.Deferred() # XXX: plugin can add their treatments to this deferred
116 116
117 if not self.host.trigger.point("MessageReceived", message, post_treat, profile=self.parent.profile): 117 if not self.host.trigger.point("MessageReceived", message, post_treat, profile=self.parent.profile):
118 return 118 return
119 119
120 data = {"from": message['from'], 120 data = {"from": message['from'],