This commit is contained in:
AliasAlreadyTaken 2022-02-26 03:14:32 +01:00
parent 787e363bdf
commit 3352844024
1 changed files with 3 additions and 4 deletions

View File

@ -32,7 +32,7 @@ local token = core.settings:get("yl_matterbridge.token") or ""
local http = core.request_http_api()
assert(http, "Please add yl_matterbridge to secure.http_mods")
assert(http, "[MOD] yl_matterbridge: Please add yl_matterbridge to secure.http_mods")
function send(user_name, message_text)
local url = "http://" .. address .. ":" .. port .. "/api/message"
@ -54,9 +54,8 @@ function send(user_name, message_text)
function(result)
if result.succeeded then
local data = core.parse_json(result.data)
core.log("action", "[MOD] yl_matterbridge : Posted " .. dump(data))
else
core.log("error", "[yl_matterbridge] " .. dump(result))
core.log("error", "[MOD] yl_matterbridge: send/http.fetch failed. Result = " .. dump(result))
return false
end
end
@ -82,7 +81,7 @@ local function receive()
end
end
else
core.log("error", "[yl_matterbridge] " .. dump(result))
core.log("error", "[MOD] yl_matterbridge: receive/http.fetch failed. Result = " .. dump(result))
return false
end
end