[JDEV] Subscription request when user gets online

David Waite dwaite at jabber.com
Wed Dec 20 12:40:00 CST 2000


Hello, I have investigated this problem and figured out a little bit of additional
information.

The jabber:iq:roster stored in XDB has extra attributes over the version used by clients
and published on docs.jabber.org. These are present in the individual roster <item>'s

-hidden: this attribute represents a boolean flag, true if present and not there
otherwise. This is to represent that there is a user relationship between the two
parties, but there is no subscription between the two, and the local party (the person
who owns the roster) has not added the other person to their list.

-subscribe: this attribute holds a string (no apparently length limit), which was
originally sent in the subscription request from the remote party to the local party. If
the request is not received directly (if the user is online), the server creates a new
'hidden' roster entry, and tacks on the subscription request 'reason' into the subscribe
field. This is removed at the same time as the entry becomes user-visible.

It is very kludgy (outstanding subscription requests probably should be stored in a
separate log, like offline messages are), but it is implemented, apparently works, and
would require a migration path to get away from. In other words, not worth touching at
this time, especially without protective gloves.

Also a FYI for client developers: the way you specify a reason for a subscription
request is by putting the reason text within the 'status' field. Something else which
wasn't documented at all (but hopefully is now).

Hope this helps out with your XDB implementation.

-David Waite

Lubos Pochman wrote:

> I am trying to implement XDB using ODBC DB interface (replace xdb_file
> module),
> based on xdb_odbc package available as unsupported with Jabber 1.0 server.
>
> Almost everything works, but I have a following problem I have trouble
> solving:
>
> If I subscribe to the user who is offline, the subscription doesn't get
> requested
> when user gets online.
>
> If I try it with xdb_file module it works. When user to be added is offline
> the following
> tag is added to jabber:iq:roster items list in user xml file (roger.xml):
>
> <item jid='lubosp at dddenim01.dddencs.desktopdollars.com' subscription='none'
> subscribe='' hidden=''/>
>
> I believe, that when this item is send to user (roger) when he gets online,
> it starts the
> subscription request.
>
> The attributes subscribe='', hidden='' are not documented in Jabber
> Programmer's file.
>
> Anybody can tell me what their meaning is and what are their possible
> values, so I can put them somehow
> in roster users table into DB, and send them back to user, as a part of the
> roster request
> when users goes online?
>
> Thanks, Lubos.
>
> _____________________________________________________________________________________
> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev





More information about the JDev mailing list