comparison src/plugins/plugin_xep_0085.py @ 724:6edd9bda4e3f

plugin XEP-0085: fixed bad return value for sendMessage trigger's post treatment
author Goffi <goffi@goffi.org>
date Tue, 03 Dec 2013 13:09:49 +0100
parents d731ae066158
children bfabeedbf32e
comparison
equal deleted inserted replaced
723:f02e2c277f0c 724:6edd9bda4e3f
175 """ 175 """
176 def treatment(mess_data): 176 def treatment(mess_data):
177 message = mess_data['xml'] 177 message = mess_data['xml']
178 to_jid = JID(message.getAttribute("to")) 178 to_jid = JID(message.getAttribute("to"))
179 if not self.__checkActivation(to_jid, forceEntityData=True, profile=profile): 179 if not self.__checkActivation(to_jid, forceEntityData=True, profile=profile):
180 return True 180 return mess_data
181 try: 181 try:
182 # message with a body always mean active state 182 # message with a body always mean active state
183 domish.generateElementsNamed(message.elements(), name="body").next() 183 domish.generateElementsNamed(message.elements(), name="body").next()
184 message.addElement('active', NS_CHAT_STATES) 184 message.addElement('active', NS_CHAT_STATES)
185 # launch the chat state machine (init the timer) 185 # launch the chat state machine (init the timer)