view mod_http_user_count/mod_http_user_count.lua @ 1494:02cd4a081db4

mod_filter_chatstates: Replace unwanted messages with a dummy stanza so that mod_message doesn't think delivery failed (and then generate an error reply)
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 Aug 2014 12:03:52 +0100
parents fe29627a5ed8
children a45f2f79e99b
line wrap: on
line source

local it = require "util.iterators";

module:depends("http");

module:provides("http", {
    route = {
        ["GET /sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end;
        ["GET /users"] = function () return tostring(it.count(it.keys(prosody.bare_sessions))); end;
    };
});