How to add a contact list to a user by the server?

Hi,

How to add a contact list to a user by the server? I have in my application server users e yours friends. I need to update ejabberd contact list from each user. How can I do that?

thanks

You may use

You may use mod_shared_roster, or enable mod_admin_extra and use the commands add_rosteritem or push_roster.

So, the algorithm code will

So, the algorithm code will be thus? (Many friends)

for (int i = 0; i < friends.size(); i ++) {
add-rosteritem peter localhost + friends.get(i).username + localhost friends.get(i).name Friends both
}

?

Syndicate content