0
votes

i hav a social site that for its chat i decide to use XMPP.so i install ejabberd as an XMPP Serve and use Jaxl lib for php to handle ejabberd.
for client also i use Strophe to send and recieve stanzas.
My problem is that i already have a list of friends that there is no exist on ejabberd server so i want to add item to roster of some one jid from server with subscription Both without any subscription suggestion to that jid.how can i do it? I dont want use ejabberdctl so adhoc and xmlrpc and mod_* that use command execution is not suitable,i wanna Do it with just stanza. Is there any way to do it with admin account(jid)?

2
i try to do this:<ejabberdctl add_roster> with subscription "both" by stanzas not by command - Abdoljabbar

2 Answers

1
votes

You can bind ejabberd with mysql and use mod_roster_odbc ,So all of your roster item stores in rosterusers table.

you can directly insert your roster items in this table.

-1
votes

I dont want use ejabberdctl so adhoc and xmlrpc and mod_* that use command execution is not suitable,i wanna Do it with just stanza.

If you don't want to use the available interfaces, you will need to write a custom module for do that with custom stanzas as you want.