mod_mam: Advertise feature in disco#info for account as per XEP-0313 >= 0.2
authorKim Alvefur <zash@zash.se>
Sat, 25 Apr 2015 15:43:59 +0200
changeset 1682 9ee56cc1be2c
parent 1681 2a4c632a24cb
child 1683 c77e9522dc66
mod_mam: Advertise feature in disco#info for account as per XEP-0313 >= 0.2
mod_mam/mod_mam.lua
--- a/mod_mam/mod_mam.lua	Thu Apr 23 17:00:59 2015 +0200
+++ b/mod_mam/mod_mam.lua	Sat Apr 25 15:43:59 2015 +0200
@@ -238,5 +238,9 @@
 module:hook("message/bare", message_handler, 2);
 module:hook("message/full", message_handler, 2);
 
-module:add_feature(xmlns_mam);
+module:add_feature(xmlns_mam); -- COMPAT with XEP-0313 v 0.1
 
+module:hook("account-disco-info", function(event)
+	event.reply:tag("feature", {var=xmlns_mam}):up();
+end);
+