Re: [prosody-dev] Re: How to handle messages on server

2015-11-06 Thread Florian Zeitz
Am 03.11.2015 um 07:43 schrieb Andrey Kaskaad: > Ok. Here is the code that works > > module:set_global(); > function module.add_host(module) > module:hook("message/bare", on_message) > end > > function on_message(event) > -- do some work > return > end > > The question now is why the m

[prosody-dev] Re: How to handle messages on server

2015-11-02 Thread Andrey Kaskaad
Ok. Here is the code that works module:set_global(); function module.add_host(module) module:hook("message/bare", on_message) end function on_message(event) -- do some work return end The question now is why the message never get sent to its destination when I return true instead of j

[prosody-dev] Re: How to handle messages on server

2015-11-02 Thread Andrey Kaskaad
Ok. Here is the code that works module:set_global(); function module.add_host(module) module:hook("message/bare", on_message) module:hook("presence/bare", on_message_presence) end local st = require "util.stanza" local bankingNS = "http://catalyticpeople.com/protocol/banking"; function on_messag