comparison sat/core/xmpp.py @ 4051:c23cad65ae99

core: renamed `messageReceived` trigger to `message_received`
author Goffi <goffi@goffi.org>
date Mon, 29 May 2023 13:32:08 +0200
parents 524856bd7b19
children
comparison
equal deleted inserted replaced
4050:199473ffe4ea 4051:c23cad65ae99
1317 return data 1317 return data
1318 1318
1319 def _on_message_start_workflow(self, cont, client, message_elt, post_treat): 1319 def _on_message_start_workflow(self, cont, client, message_elt, post_treat):
1320 """Parse message and do post treatments 1320 """Parse message and do post treatments
1321 1321
1322 It is the first callback called after messageReceived trigger 1322 It is the first callback called after message_received trigger
1323 @param cont(bool): workflow will continue only if this is True 1323 @param cont(bool): workflow will continue only if this is True
1324 @param message_elt(domish.Element): message stanza 1324 @param message_elt(domish.Element): message stanza
1325 may have be modified by triggers 1325 may have be modified by triggers
1326 @param post_treat(defer.Deferred): post parsing treatments 1326 @param post_treat(defer.Deferred): post parsing treatments
1327 """ 1327 """
1352 1352
1353 # plugin can add their treatments to this deferred 1353 # plugin can add their treatments to this deferred
1354 post_treat = defer.Deferred() 1354 post_treat = defer.Deferred()
1355 1355
1356 d = self.host.trigger.async_point( 1356 d = self.host.trigger.async_point(
1357 "messageReceived", client, message_elt, post_treat 1357 "message_received", client, message_elt, post_treat
1358 ) 1358 )
1359 1359
1360 d.addCallback(self._on_message_start_workflow, client, message_elt, post_treat) 1360 d.addCallback(self._on_message_start_workflow, client, message_elt, post_treat)
1361 1361
1362 def complete_attachments(self, data): 1362 def complete_attachments(self, data):