Mercurial > libervia-backend
diff src/plugins/plugin_xep_0033.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 | f3513c8cc2e6 |
children | 301b342c697a |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0033.py Sat Mar 22 13:47:33 2014 +0100 +++ b/src/plugins/plugin_xep_0033.py Sat Mar 22 15:34:05 2014 +0100 @@ -76,7 +76,7 @@ host.trigger.add("sendMessage", self.sendMessageTrigger, TriggerManager.MIN_PRIORITY) host.trigger.add("MessageReceived", self.messageReceivedTrigger) - def sendMessageTrigger(self, mess_data, treatments, profile): + def sendMessageTrigger(self, mess_data, pre_xml_treatments, post_xml_treatments, profile): """Process the XEP-0033 related data to be sent""" def treatment(mess_data): @@ -101,7 +101,7 @@ d.addCallbacks(discoCallback, lambda dummy: discoCallback(None)) return d - treatments.addCallback(treatment) + post_xml_treatments.addCallback(treatment) return True def sendAndStoreMessage(self, mess_data, entries, profile):