[jdev] presence subsription rejection notifications while offline.

Philipp Hancke fippo at goodadvice.pages.de
Wed May 12 10:12:20 CDT 2010


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?

This might be possible by storing the unsubscribed stanza on the server 
when the user is offline, ie. adding a rule similar to the fifth rule of 
section 3.1.3 in section 3.2.3 in 3921bis-06, and then sending this when 
the roster is fetched.


More information about the JDev mailing list