[jdev] Best practices regarding roster management by clients ?
Lucas Nussbaum
lucas at lucas-nussbaum.net
Thu Sep 8 08:00:30 CDT 2005
Hi,
The XMPP IM RFC[0] explains how subscriptions and roster integrate.
However, several points are left to the client author's discretion, and
this lead to some confusion. I haven't found any global policy about
this.
[0] http://www.xmpp.org/specs/rfc3921.html#int
First, let's update everyone about subscription states. A contact in
your roster can have the following subscription states :
- subscription=none : You aren't interested in the other party's
presence, and neither is the other party interested in yours.
- subscription=from : The other party is interested in your presence
information, but you don't care about the other party. (You must be
somebody important ;)
- subscription=to : You are interested in the other party's presence,
but the other party doesn't care about your presence. (The other party
must be a client developer of a busy server admin ;)
- subscription=both : You and the other party are interested in each other.
Additionally, if sub=from or sub=none, you can have ask=subscribe, which
means you asked for the other party authorisation to see its presence,
but the other party hasn't answered yet.
Now, my questions :
(A) Should a client display contacts with subscription=none or
subscription=from (and not ask=subscribe) ? You obviously don't care
about those contacts, and they will never send you any presence, so why
lose space in your contact list ?
(B) How should clients handle the removal of contacts ? I think that :
- if sub=both, a presence type=unsubscribe should be sent so
subscription becomes from (the fact that you are no longer interested
in somebody's presence doesn't mean the other party doesn't want to
see your presence anymore). Additionally, the client should ask the
user whether he wants to forbid the other party from seeing the user
presence (and then send presence with type=unsubscribed)
- if sub=to, sub=from or sub=none, there's no problem.
What do you think ?
This is a problem in a lot of clients. For example, both tkabber and
gajim display contacts with sub=none or sub=from (see (A)), and both
send presence type=unsubscribe and type=unsubscribed when the user
"removes" a contact from roster.
When we reach a consensus, maybe an Informational JEP about this should
be written.
--
| Lucas Nussbaum
| lucas at lucas-nussbaum.net http://www.lucas-nussbaum.net/ |
| jabber: lucas at nussbaum.fr GPG: 1024D/023B3F4F |
More information about the JDev
mailing list