ejabberd - Comments for "user_send_packet event hook not receiving presence packets" https://www.ejabberd.im/node/2891 en thanks for the help. but the https://www.ejabberd.im/node/2891#comment-52005 <p>thanks for the help. but the problem is none of the hooks are fired for muc events. more specifically i want to get hold of any presence message sent by a user to muc room. the module i am writing POSTs these packets to our weblogic server. One of the requirements is the server should not receive duplicate packets. so i have to filter all the messages in the ejabberd module before POSTing. which is very difficult if listening on user_receive_packet, which is only hook i know of which will give me presence packets of muc.</p> <p>ofcourse, it would be great if user_send_packet worked. </p> <p>JJ</p> Mon, 17 Mar 2008 18:08:31 +0000 jjoshi comment 52005 at https://www.ejabberd.im Looking at the ejabberd https://www.ejabberd.im/node/2891#comment-51987 <p>Looking at the ejabberd source code, it seems presence packets sent by the user use a different set of hooks:</p> <ul> <li>When a local user sends the initial presence at login, or changes his presence information ('show' element, priority, or status text): set_presence_hook(User, Server, Resource, PresenceEl) </li><li>When a local user sends a presence of type 'unavailable': unset_presence_hook(User, Server, Resource, StatusText) </li><li>When a local user closes his c2s connection: unset_presence_hook(User, Server, Resource, PresenceEl) </li><li>When a local user closes his c2s connection after sending an unavailable presence, none of those hooks is called. </li></ul> Thu, 13 Mar 2008 15:14:23 +0000 mfoss comment 51987 at https://www.ejabberd.im