ejabberd - Comments for "Make ejabberd pick up changes in external roster" https://www.ejabberd.im/forum/28652/make-ejabberd-pick-changes-external-roster en I got a tip to use https://www.ejabberd.im/forum/28652/make-ejabberd-pick-changes-external-roster#comment-67262 <p>I got a tip to use <code>add_rosteritem</code> and <code>delete_rosteritem</code> in the HTTP API. I tested and they seem to be somewhat usable: if <code>add_rosteritem</code> is called for a currently connected user, that user is notified of the new roster item. However I have two problems:</p> <p>Our web service has a bit complex method for building the roster. It's no problem to generate a complete list of roster items, but to find what roster items have been removed and added is not trivial. So I would much prefer a solution where Ejabberd could be notified that the roster for a specific user has been updated and should be refetched in its entirety.</p> <p>The second thing is that as far as I understand it <code>add_rosteritem</code> is supposed to add a roster item to the database. Since our web service may not be changed by ejabberd I've left those methods empty, but if I had implemented them it would lead to an infinite loop: a roster item is added on the web service, which leads to add_rosteritem being called, which leads to a roster item being added to the web service ...</p> <p>So add_rosteritem/delete_rosteritem are quite hard to use and they don't really seem to fit, even if it's possible to make it work with them...</p> <p>Btw, I also noted that the HTTP API function <code>get_roster</code> actually fetch the roster from the web service, but sadly the roster of the connected users are not updated.</p> Wed, 11 Jan 2017 21:45:37 +0000 jomag comment 67262 at https://www.ejabberd.im