Reputation: 11
Actually I am trying to create users in the ejabberd server using strophe library.. I got one code for little same like below (this code is developed myself):
var stanza = $iq({to: MUC_ROOM + "@" + MUC_COMPONENT, type: 'set', id: 'divReg'})
.c('query', {xmlns: 'jabber:iq:register'})
.c('username', GaaChat.gauser)
.c('password', GaaChat.gapass)
.tree();
connection.sendIQ(stanza);
<iq type='set' id='divReg'>
<query xmlns='jabber:iq:register'>
<username> bill </username>
<password> 123 </password>
</query>
</iq>
The problem is i didnt get any response.. Please tell me above chat.js program is correct or not.. please tell me any other alternatives..
Upvotes: 1
Views: 1879
Reputation: 31
password will become child object of username. call up() function after username.
http://strophe.im/strophejs/doc/1.0.1/files/core-js.html#Strophe.Builder.up
Upvotes: 3