Mercurial > prosody-modules
view mod_http_user_count/mod_http_user_count.lua @ 1667:c81a981479d4
mod_privilege: implemented probing of rosters items (for existing sessions only) on connection + use a globally shared table for priv_session (and fixed last_presence)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 08 Apr 2015 13:04:04 +0200 |
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; }; });