mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bf_...@brainlounge.de>
Subject Re: [Vysper] Offline chat messages lost, volunteering
Date Sun, 09 Jan 2011 17:01:00 GMT
On 09.01.11 16:50, Thomas Kratz wrote:
> HI Bernd, Hi Niklas,

Welcome Thomas! Thanks for volunteering.

> I found that I'm still subscribed to this list, haven't followed over
> the last months indeed.
> As I wrote on the users list, I found that offline messages get lost.

Please note that contact requests (presence subscription requests) do 
get lost, too (VYSPER-9). Don't know if this can easily be covered at 
the same time.

> I am willing to try to implement this, but I guess I need some
> starting points.

Here are some more general hints about offline message handling. There 
are (at least) two XMPP extensions covering this topic (beyond the 
general terms of RFC 3920 + 3921):

http://xmpp.org/internet-drafts/draft-saintandre-rfc3921bis-02.html - 
8.1 Inbound Stanzas
http://xmpp.org/extensions/xep-0013.html - Flexible Offline Message 
Retrieval
http://xmpp.org/extensions/xep-0160.html - Best Practices for Handling 
Offline Messages


> I had a look at the code where the OfflineStanzaReceiver comes to
> play. I guess I would have a new Memory StorageProvider there that
> could act as a receiver. Would you be fine if I have a StorageProvider
> Interface that extends OfflineStanzaReceiver or is this too crude an
> approach?

Sounds good as a first approach. This would be covered under 
https://issues.apache.org/jira/browse/VYSPER-180 already.

> The OfflineStanzaStorageProvider would have a simple method like
> Collection<Stanza>  getPendingStanzas(bareJID)
>
> I guess I would ask the StorageProvider for Stanzas to deliver when
> the Users Presence becomes "available" again, but I have absolutely no
> clue where to hook in for that.

I don't think this hook exists already.

> Should this go in the PresenceHandler
> ? Here I need some pointers to get me started with the code. As far as
> I can see it should be easy then to try to deliver the stanzas once
> more, is it ?

Yes, sounds about right. I'd go for 
PresenceAvailabilityHandler.handleInboundAvailable()

Have fun,

   Bernd

Mime
View raw message