DJ Adams wrote:
> /* copy the old stuff into the new one and insert it into the roster */
> xmlnode_put_attrib(cur,"subscription",xmlnode_get_attrib(item,"subscription"));
> xmlnode_put_attrib(cur,"subscribe",xmlnode_get_attrib(item,"subscribe"));
>
> which is slightly wrong as "subscribe" isn't a valid attribute of <item>, and
> more importantly, the "ask" attribute isn't getting copied.
>
'subscribe' isn't a valid attribute, but it is still used by the server when it
stores rosters. There is also a 'hidden' attribute. Other servers cannot 'push'
subscription requests to a user when they come online, because they do not have a
way to know when that user actually *is* online.. they can't get presence, because
the subscription isn't there yet. So the 'hidden' and 'subscribe' attributes cache
subscription requests in the roster until they are accepted or denied (presence
type 'subscribed' or 'unsubscribed').
It would seem that ideally this should all be stored separate from the roster, in
an 'offline subscription cache', much like there is an offline message cache. It's
very ugly currently; people get into your roster without you actually subscribing
them, and there are extra attributes which aren't part of the 'jabber:iq:roster'
DTD. The client doesn't see these extra attributes or extra roster entries though,
which is why it is more of a beautification thing.
-David Waite
_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev