Hello,

I suggest these minor changes to mod_mam_archive for the only purpose of 
getting it working again - with "sql" storage backend replacing the 
outdated "sql2" storage.
This makes sense as some XMPP clients still use XEP-0136, which is Draft.

If you do not find it harmful, but nobody wants to apply this patch to 
mod_mam_archve, may I have commit access to prosody-modules repo, please?

The patch is attached. Email conversation with the mod_mam_archve module 
author follows by.

-------- Forwarded Message --------
Subject: Re: mod_mam_archive to support "sql" storage
Date: Fri, 16 Dec 2016 16:19:09 +0100
From: Aleksandr Bogdanov <s...@syn.im>
To: Victor Kulichenko <onc...@gmail.com>

Hi Victor,
thanks for your patch.
Unfortunately I don't have the commit access to prosody-modules repository.
I have worked on this module more than a year ago, and it was since 
migrated from google code.
Please get in touch with Prosody devs on the mailing list 
https://groups.google.com/forum/#!forum/prosody-dev
-- 
Best Regards,
Aleksandr Bogdanov
16.12.2016, 16:12, "Victor Kulichenko" <onc...@gmail.com>:
> Hello,
> could you please apply this patch to mod_mam_archive?
> diff -r 97b4229982f5 mod_mam_archive/mod_mam_archive.lua
> --- a/mod_mam_archive/mod_mam_archive.lua Sun Dec 04 10:19:07 2016 +0100
> +++ b/mod_mam_archive/mod_mam_archive.lua Fri Dec 16 21:04:00 2016 +0600
> @@ -134,7 +134,7 @@
> 
> -- excerpt from mod_storage_sql2
> local function get_db()
> - local mod_sql = module:require("sql");
> + local sql = require("util.sql");
> local params = module:get_option("sql");
> local engine;
> 
> @@ -144,7 +144,7 @@
> end
> 
> assert(params.driver and params.database, "Both the SQL driver and the 
database need to be specified");
> - engine = mod_sql:create_engine(params);
> + engine = sql:create_engine(params);
> engine:set_encoding();
> 
> return engine;
> This these minor changes the module seems to be working with actual 
> "sql" storage.
> Thanks,
> Victor

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# User Victor Kulichenko <onc...@gmail.com>
# Date 1481965133 -21600
#      Sat Dec 17 14:58:53 2016 +0600
# Node ID 21c08dbdd158b46c4598160675cd051a796499d2
# Parent  ef95853cf900171e58477deef309b92e7142bf56
mod_mam_archive: Replace storage requirement from sql2 to sql (fixes #550 #594)

diff -r ef95853cf900 -r 21c08dbdd158 mod_mam_archive/README.markdown
--- a/mod_mam_archive/README.markdown	Fri Dec 16 03:30:46 2016 +0100
+++ b/mod_mam_archive/README.markdown	Sat Dec 17 14:58:53 2016 +0600
@@ -20,7 +20,7 @@
 =====
 
 First configure mod\_mam as specified in it's [wiki][mod\_mam]. Make
-sure it uses sql2 storage backend.
+sure it uses sql storage backend.
 
 Then add "mam\_archive" to your modules\_enabled list:
 
diff -r ef95853cf900 -r 21c08dbdd158 mod_mam_archive/mod_mam_archive.lua
--- a/mod_mam_archive/mod_mam_archive.lua	Fri Dec 16 03:30:46 2016 +0100
+++ b/mod_mam_archive/mod_mam_archive.lua	Sat Dec 17 14:58:53 2016 +0600
@@ -134,7 +134,7 @@
 
 -- excerpt from mod_storage_sql2
 local function get_db()
-    local mod_sql = module:require("sql");
+    local sql = require("util.sql");
     local params = module:get_option("sql");
     local engine;
 
@@ -144,7 +144,7 @@
     end
 
     assert(params.driver and params.database, "Both the SQL driver and the database need to be specified");
-    engine = mod_sql:create_engine(params);
+    engine = sql:create_engine(params);
     engine:set_encoding();
 
     return engine;

Reply via email to