[Standards] need clarification about adding own jid to roster

Waqas Hussain waqas20 at gmail.com
Wed Feb 23 19:59:05 UTC 2011

On Wed, Feb 23, 2011 at 6:10 PM, Sebastian Reitenbach
<sebastia at l00-bugdead-prods.de> wrote:
> Hi,
> as xmpp client developer (coccinella), I want to add my own jid to my roster.
> The last time I worked on that, was about a year ago. There I took
> RFC3921bis-08 as reference. There in chapter 2.3.3 at the end it stated:
>   The server MUST return a <not-allowed/> stanza error to the client if
>   the value of the <item/> element's 'jid' attribute matches the bare
>   JID <node at domain> portion of the <iq/> element's 'from' attribute
>   (i.e., a JID MUST NOT be allowed to add itself to its own roster).
> Therefore I was looking into adding some exceptions to handle the own JID in
> the roster, or better explained as adding a fake jid to the roster view in the
> client. I got a bit distracted with other stuff, and just recently started
> again working on that.
> now I just looked again to the in the latest revision,  20, of the RFC, and I
> read this now:
>      Interoperability Note: Some servers return a <not-allowed/> stanza
>      error to the client if the value of the <item/> element's 'jid'
>      attribute matches the bare JID <localpart at domainpart> of the
>      user's account.
> So I should understand this statement now as:
> Servers should generally allow the client user to add the own JID to the
> roster, this is no error anymore. Only older server implementations may not
> allow adding the own jid.
> If my understanding is right, then this would make my life much more easier
> since I don't need to implement exceptions for the own jid.
> cheers,
> Sebastian

Your client shouldn't disallow it. However, this is a relatively
recent change, and your client should handle a <not-allowed/> error

Waqas Hussain

More information about the Standards mailing list