Realbitt
Realbitt

Reputation: 408

xmpp how to Get Current Connection jid name

I have two questions about the XMPP protocol:

1) how can I request Name for my current JID (My Connected Account) as registered first time by requesting IQ command ?

2) How can I change nickname for one of my roster accounts(JIDS) ?

Upvotes: 0

Views: 857

Answers (1)

Arioch 'The
Arioch 'The

Reputation: 16125

http://www.rfc-editor.org/rfc/rfc6121.txt

Section 2.1.2.4 describes NAME attribute.

The 'name' attribute ... determined by the user (not the contact). Although the value of the 'name' attribute MAY have meaning to a human user, it is opaque to the server. It is OPTIONAL for a client to include the 'name' attribute when adding or updating a roster item.

That basically means the connection itself does not have NAME.

And if you added yourself in your own roster - then it is no different that getting NAME for any other contact.


Section 2.1.5 shows the needed stanza to change some attribute - in your case that would be NAME attribute.


If you have any quesito nwith XMPP - most easy would be to take some long-existing lcient like JAJC or Vacuum-IM, open XML Log Console, do your action and read which stanzes been really exchanged.

Upvotes: 1

Related Questions