changeset 2200:e9e38ae8037f

mod_cloud_notify: Advertise feature on bare jid disco (thanks iNPUTmice)
author Kim Alvefur <zash@zash.se>
date Mon, 06 Jun 2016 15:25:29 +0200
parents 2582d09d2ec4
children eb5555a3a535
files mod_cloud_notify/mod_cloud_notify.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua	Fri Jun 03 15:28:38 2016 +0200
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Mon Jun 06 15:25:29 2016 +0200
@@ -18,7 +18,9 @@
 local push_enabled = module:shared("push-enabled-users");
 
 -- http://xmpp.org/extensions/xep-0357.html#disco
-module:add_feature(xmlns_push);
+module:hook("account-disco-info", function(event)
+	(event.reply or event.stanza):tag("feature", {var=xmlns_push}):up();
+end);
 
 -- http://xmpp.org/extensions/xep-0357.html#enabling
 module:hook("iq-set/self/"..xmlns_push..":enable", function (event)