diff src/plugins/plugin_xep_0085.py @ 922:c897c8d321b3

core: sendMessageTrigger now manage pre and post treatments, which happen before or after XML generation
author Goffi <goffi@goffi.org>
date Sat, 22 Mar 2014 15:34:05 +0100
parents 1a759096ccbd
children 301b342c697a
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0085.py	Sat Mar 22 13:47:33 2014 +0100
+++ b/src/plugins/plugin_xep_0085.py	Sat Mar 22 15:34:05 2014 +0100
@@ -175,7 +175,7 @@
             break
         return True
 
-    def sendMessageTrigger(self, mess_data, treatments, profile):
+    def sendMessageTrigger(self, mess_data, pre_xml_treatments, post_xml_treatments, profile):
         """
         Eventually add the chat state to the message and initiate
         the state machine when sending an "active" state.
@@ -198,7 +198,7 @@
                     message.addElement(state, NS_CHAT_STATES)
             return mess_data
 
-        treatments.addCallback(treatment)
+        post_xml_treatments.addCallback(treatment)
         return True
 
     def __checkActivation(self, to_jid, forceEntityData, profile):