redsolution / xabber-android

Open-source XMPP client for Android
http://xabber.com
Other
1.82k stars 815 forks source link

mod_mam not working as expected #833

Open cszawisza opened 6 years ago

cszawisza commented 6 years ago

Hi!

I have a prosody 0.10 server with mod_mam enabled.

In xabber "Server info" tab the XEP-0313 is checked as available, also urn:xmpp:mam:[0,1,2] are listed in the Features list but the "Chat History:Message Archive Management" tab has an information that "the server does not support storing chat history" Why?

andrewnenakhov commented 6 years ago

Can you provide us with a working XMPP account on your server?

cszawisza commented 6 years ago

xabber@eedb.pl pass:xabber

also in order to xabber even consiger mod_mam as enabled i needed to add those lines to prosody mod_mam module

# hg diff
diff -r 73ada978dabc mod_mam/mod_mam.lua
--- a/mod_mam/mod_mam.lua       Wed Jun 13 17:09:49 2018 +0000
+++ b/mod_mam/mod_mam.lua       Thu Jun 14 11:17:28 2018 +0200
@@ -421,11 +421,14 @@
 module:hook("message/full", message_handler, priority);

 module:add_feature(xmlns_mam0); -- COMPAT with XEP-0313 v 0.1
+module:add_feature(xmlns_mam1);
+module:add_feature(xmlns_mam2);
+module:add_feature(xmlns_st_id);

-module:hook("account-disco-info", function(event)
-       (event.reply or event.stanza):tag("feature", {var=xmlns_mam0}):up();
-       (event.reply or event.stanza):tag("feature", {var=xmlns_mam1}):up();
-       (event.reply or event.stanza):tag("feature", {var=xmlns_mam2}):up();
-       (event.reply or event.stanza):tag("feature", {var=xmlns_st_id}):up();
-end);
+-- module:hook("account-disco-info", function(event)
+--     (event.reply or event.stanza):tag("feature", {var=xmlns_mam0}):up();
+--     (event.reply or event.stanza):tag("feature", {var=xmlns_mam1}):up();
+--     (event.reply or event.stanza):tag("feature", {var=xmlns_mam2}):up();
+--     (event.reply or event.stanza):tag("feature", {var=xmlns_st_id}):up();
+-- end);

and, as far as I can see the behavior of application changed after I restarted it, from "the server does not support storing chat history" to gray field with info "Support for chat history server store is not determined yet"