浏览代码

Fix get subdomain function

master
Andrei Bora 4 年前
父节点
当前提交
c4ef7d8601
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      resources/prosody-plugins/util.lib.lua

+ 1
- 1
resources/prosody-plugins/util.lib.lua 查看文件

239
 function extract_subdomain(room_node)
239
 function extract_subdomain(room_node)
240
     -- optimization, skip matching if there is no subdomain, no [subdomain] part in the beginning of the node
240
     -- optimization, skip matching if there is no subdomain, no [subdomain] part in the beginning of the node
241
     if not starts_with(room_node, '[') then
241
     if not starts_with(room_node, '[') then
242
-        return room_node;
242
+        return nil,room_node;
243
     end
243
     end
244
 
244
 
245
     return room_node:match("^%[([^%]]+)%](.+)$");
245
     return room_node:match("^%[([^%]]+)%](.+)$");

正在加载...
取消
保存