瀏覽代碼

Handles the async wrapping of the mod_muc_size functions

fixes handling of keyserver ASAP validation of tokens
wraps room and room-size APIs
j8
Aaron van Meerten 7 年之前
父節點
當前提交
b6efdb533d
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    2
      resources/prosody-plugins/mod_muc_size.lua

+ 3
- 2
resources/prosody-plugins/mod_muc_size.lua 查看文件

@@ -9,6 +9,7 @@ local it = require "util.iterators";
9 9
 local json = require "util.json";
10 10
 local iterators = require "util.iterators";
11 11
 local array = require"util.array";
12
+local wrap_async_run = module:require "util".wrap_async_run;
12 13
 
13 14
 local tostring = tostring;
14 15
 local neturl = require "net.url";
@@ -192,9 +193,9 @@ function module.load()
192 193
 	module:provides("http", {
193 194
 		default_path = "/";
194 195
 		route = {
195
-			["GET room-size"] = handle_get_room_size;
196
+			["GET room-size"] = function (event) return wrap_async_run(event,handle_get_room_size) end;
196 197
 			["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end;
197
-			["GET room"] = handle_get_room;
198
+			["GET room"] = function (event) return wrap_async_run(event,handle_get_room) end;
198 199
 		};
199 200
 	});
200 201
 end

Loading…
取消
儲存