comparison mod_stats39/mod_stats39.lua @ 3847:ffc64d285a96

mod_stats39: Advertise namespace as feature (not part of the XEP?)
author Kim Alvefur <zash@zash.se>
date Sun, 19 Jan 2020 19:31:43 +0100
parents 3941768916f1
children bac3dae031ee
comparison
equal deleted inserted replaced
3846:3941768916f1 3847:ffc64d285a96
1 local statsman = require "core.statsmanager"; 1 local statsman = require "core.statsmanager";
2 local st = require "util.stanza"; 2 local st = require "util.stanza";
3 local s_format = string.format; 3 local s_format = string.format;
4
5 module:add_feature("http://jabber.org/protocol/stats");
4 6
5 module:hook("iq/host/http://jabber.org/protocol/stats:query", function (event) 7 module:hook("iq/host/http://jabber.org/protocol/stats:query", function (event)
6 local origin, stanza = event.origin, event.stanza; 8 local origin, stanza = event.origin, event.stanza;
7 local stats, _, extra = statsman.get_stats(); 9 local stats, _, extra = statsman.get_stats();
8 local reply = st.reply(stanza); 10 local reply = st.reply(stanza);