Search code examples
androidxmppasmackmongoose-im

flexible offline messages retrieval returning false


In my XMPP chat application, I am using ASMACK library 4.0.6 on the Android client side.

I want to retrieve offline messages when an XMPP connection is established. For that, first I check whether the server has support for flexible retrieval. The server always returns false. We enabled the offline module in MongooseIM server. But why am I getting false from server?

if (!offlineMessageManager.supportsFlexibleRetrieval()) {
Log.i("Offline messages not supported","" + offlineMessageManager.supportsFlexibleRetrieval());
                return;
}

If I try with pidgin client, I get offline messages..


Solution

  • Disclaimer: I work on MongooseIM.


    Guessing from the API you're trying to use it implements XEP-0013 - MongooseIM doesn't support this XEP. Ensure what protocol .supportsFlexibleRetrieval() really uses underneath.

    MongooseIM supports XEP-0313 version 0.2 and will support the newest version of this XEP. Verify whether your client library supports this XEP and which version of it. The relevant module to run on the server is mod_mam. Please refer to the MongooseIM wiki on GitHub, since its configuration is a bit complex.

    Alternatively, you can rely on mod_offline automatically pushing the offline messages when a resource connects.