[Standards] presence suscription rejection notification

Peter Saint-Andre stpeter at stpeter.im
Sat Jun 5 03:36:16 UTC 2010


On 5/12/10 9:51 AM, Daniel V. Grillo wrote:
> Hi Folks,
> 
> I’ve built a minimal xmpp client to keep track of contacts presence
> status.  In previous versions, if a user asked a contact for a
> subscription to
> 
> presence, my client automatically granted it.  Now I want to notify a
> contact of such a request and let them grant or reject it. I have it
> working according to rfc 3921 section 8.
> 
> I do have one question/issue though.  If a users presence request is
> denied by the contact while the user is online, he gets notified of the
> rejection as defined in section 8.2.1 (using the ejabberd server).  I
> can then pop up a notification stating “so and so rejected your
> request”. But if the user is offline when the rejection happens, and
> then logs in, he gets no such notification.   He just gets his roster
> with that contact in the “none” state with the “ask” flag stripped and
> no indication of how that contact got that way. Since  a contact can end
> up in the none state in various ways, I can’t use that fact to pop up a
> notification. So my question is, how can I give a user notification that
> his subscription requests were rejected while he was offline?  I see
> that psi has the same issue and so does Exodus. They give rejection
> notifications while the user is online, but not when he got the
> rejection while logged off and then logs on. Any way to implement such a
> feature using the current protocol.

RFC 3921 and rfc3921bis are silent on this issue, which has come up in
other discussions I've had recently off-list. At least one XMPP server
implementation I'm aware of caches and sends presence stanzas of type
subscribed, unsubscribe, and unsubscribed. When I complete my "editor's
review" of draft-ietf-xmpp-3921bis I will probably propose that we make
this behavior recommended (but not required). Unfortunately it will be
quite some time before most XMPP servers follow that recommendation, so
in your client you'll need to suffer through for a while.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6820 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20100604/6f025919/attachment.bin>


More information about the Standards mailing list