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 just return?

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to