Compare commits

..

1 Commits

Author SHA1 Message Date
5062c9dd15 Trying again 2026-04-20 12:20:25 -04:00

View File

@@ -228,18 +228,19 @@ function Room:get_alias_or_id()
end end
end end
local make_unimplemented_handler
local make_unimplemented_handler = function (self, event) local make_unimplemented_handler = function (self, event)
local env_value = os.getenv("MATRIX_CLIENT_LOG_UNHANDLED_EVENTS") local env_value = os.getenv("MATRIX_CLIENT_LOG_UNHANDLED_EVENTS")
if env_value and #env_value > 0 and env_value ~= "0" then if env_value and #env_value > 0 and env_value ~= "0" then
local function handler(self, event) local function handler(self, event)
self:_log("unhandled '%s' event: %s", event.type, json.encode(event)) self:_log("unhandled '%s' event: %s", event.type, json.encode(event))
end end
local function make_unimplemented_handler(self, event) make_unimplemented_handler = function (self, event)
return handler return handler
end end
else else
local function handler(self, event) end local function handler(self, event) end
local function make_unimplemented_handler(self, event) make_unimplemented_handler = function (self, event)
self:_log("no handler for '%s' events (this warning is shown only once)", event.type) self:_log("no handler for '%s' events (this warning is shown only once)", event.type)
return handler return handler
end end