truckhiem / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

presence nickname #110

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
How can i sent the nick for presence subscribe?

Original issue reported on code.google.com by anca.b...@gmail.com on 12 May 2011 at 10:53

GoogleCodeExporter commented 8 years ago
This took me forever to find! I was using xmpphp, but got the solution from 
using jquery Strophe.

First do:
<iq type='set' xmlns='jabber:client' id='9155:sendIQ'><query 
xmlns='jabber:iq:roster'><item jid='user@localhost' 
name='usernickname'/></query></iq>

Followed by:
<presence to='user@localhost' type='subscribe' xmlns='jabber:client'/>

Then to rename again:

<iq type='set' xmlns='jabber:client' id='9155:sendIQ'><query 
xmlns='jabber:iq:roster'><item jid='kafkav2@localhost' 
name='kafkav2RENAME'/></query></iq>

Hope this helps, because 

Original comment by caz...@gmail.com on 6 Sep 2012 at 2:54