ejabberd - Comments for "detect subscribe request for offline users" https://www.ejabberd.im/forum/25476/detect-subscribe-request-offline-users en There isn't a specific event https://www.ejabberd.im/forum/25476/detect-subscribe-request-offline-users#comment-66891 <p>There isn't a specific event that is called when a subscription request is sent to an offline user. You have two options: add a hook to the subscription sent, and manually check if the receiver is offline. Or add a hook to the offline storage, and manually check if the message is a subscription request :)</p> Wed, 25 May 2016 21:19:18 +0000 badlop comment 66891 at https://www.ejabberd.im So we added both hooks https://www.ejabberd.im/forum/25476/detect-subscribe-request-offline-users#comment-66887 <p>So we added both hooks roster_out_subscription and roster_in_subscription in a module and looks like they are both triggered, no matter if the user to whom subscribe request is being sent to is offline or not. Is that expected behavior? I just need to capture the event/state when user is offline.</p> Wed, 18 May 2016 03:28:01 +0000 navjeetc comment 66887 at https://www.ejabberd.im When a user sends a https://www.ejabberd.im/forum/25476/detect-subscribe-request-offline-users#comment-66885 <p>When a user sends a subscription request to an offline account in the same server, those hooks are run (among others):<br /> * using run: roster_out_subscription<br /> * using run_fold: roster_in_subscription<br /> * also using run_fold: roster_process_item</p> Mon, 16 May 2016 16:26:50 +0000 badlop comment 66885 at https://www.ejabberd.im