From b6efdb533d0c8715fdc399e3aee903bb3671acb2 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Thu, 20 Jul 2017 16:04:16 -0500 Subject: [PATCH] Handles the async wrapping of the mod_muc_size functions fixes handling of keyserver ASAP validation of tokens wraps room and room-size APIs --- resources/prosody-plugins/mod_muc_size.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/prosody-plugins/mod_muc_size.lua b/resources/prosody-plugins/mod_muc_size.lua index b481f78ac..921e7b37b 100644 --- a/resources/prosody-plugins/mod_muc_size.lua +++ b/resources/prosody-plugins/mod_muc_size.lua @@ -9,6 +9,7 @@ local it = require "util.iterators"; local json = require "util.json"; local iterators = require "util.iterators"; local array = require"util.array"; +local wrap_async_run = module:require "util".wrap_async_run; local tostring = tostring; local neturl = require "net.url"; @@ -192,9 +193,9 @@ function module.load() module:provides("http", { default_path = "/"; route = { - ["GET room-size"] = handle_get_room_size; + ["GET room-size"] = function (event) return wrap_async_run(event,handle_get_room_size) end; ["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end; - ["GET room"] = handle_get_room; + ["GET room"] = function (event) return wrap_async_run(event,handle_get_room) end; }; }); end