diff --git a/matrix/api.lua b/matrix/api.lua index 164f2ee..25466b9 100644 --- a/matrix/api.lua +++ b/matrix/api.lua @@ -88,7 +88,7 @@ function API:sync(options) filter = options.filter, since = options.since, full_state = options.full or false, - set_presence = online and nil or "offline", + set_presence = options.online and nil or "offline", timeout = options.timeout, } end diff --git a/matrix/client.lua b/matrix/client.lua index 5f85bd5..8999095 100644 --- a/matrix/client.lua +++ b/matrix/client.lua @@ -239,7 +239,7 @@ local make_unimplemented_handler = function (self, event) end else local function handler(self, event) end - make_unimplemented_handler = function (self, event) + local make_unimplemented_handler = function (self, event) self:_log("no handler for '%s' events (this warning is shown only once)", event.type) return handler end