Best way to save messages even after delivery?

Hi!

I’'m using XEP-0013 which let messages be stored on server so that user could choose self when those should be deleted. This is working great as long as user is offline(not reported available to server), but new messages are not forwared to user until she is set presence.available. Setting user to available and new messages are forwarded, but no longer stored on server. So currently I never let client go online and are constantly polling for new messages in offline mode, but this is very ineffective.

Are there any Openfire that can guide me to where this is dictated in the source so that I can change so messages are stored on server al’'a offline even when client is on-line??

It would be very appreciated! Thanks!

BTW, I have sent a request to Peter Saint-Andre a.k.a XMPP.org fame, to include support for this in future XEP-0013. It will be intressting to see what he has to say about it, but it’'s very important for us developing for mobilephones…

// Henrik

Hi again!

No, takers? Which solution would be simplest to use for implementing support for this, should I keep the clients NOT pressent and add a route so that messages are delivered after they are stored in the OfflineMessageManager, or should I let the clients become pressent and store the message to the OfflineManager after they are delivered??

As I understand it, please correct me if i’'m wrong, the messages are delivered directly to recipient if they are not online, so they never go to the OfflineMessageManger unless recipient is offline. Exactly where is this decision made?

Thanks!

After spending the whole day digging thorugh the Openfire-source I finally found a place to store messages from.

In the org.jivesoftware.openfire.MessageRouter I placed a “messageStrategy.storeOffline(packet);” wherever I found a “session.process(packet);”. Sure, it’‘s a hack. But it’‘s atleast working now. I have to demo this for our customers next week, so i’'m under some preasure. =)

As i’‘ve seen other threads asking for this, I thought I’'ll give you some hint how I got around the problem.

It would be nice if this could be made into a module that one could unload, but I don’‘t know if it’'s possible…

Message was edited by: trycoon

Isn’'t this part of message auditing? Maybe those functionalities can be adapted to your needs.

I wouldn’‘t make it a standard of messaging, since people do appreciate privacy. If it’'s part of auditing, the meaning is clear(er).