Removed unused vars.

This commit is contained in:
- 2022-01-28 19:53:03 -08:00
parent b532d5ca28
commit 427f0cc331
1 changed files with 2 additions and 7 deletions

View File

@ -1,6 +1,4 @@
print("Matrix bridge loaded.")
local modpath = minetest.get_modpath(minetest.get_current_modname())
dofile(modpath.."/config.lua")
@ -21,7 +19,6 @@ local MatrixChat = {
userid = nil,
token = nil,
since = nil,
lastok_since = nil,
eventid = nil
}
@ -92,7 +89,6 @@ function MatrixChat:sync(timeout)
local response = minetest.parse_json(res.data)
if response ~= nil then
MatrixChat:minechat(response)
self.lastok_since = self.since
self.since = response.next_batch
end
end
@ -159,11 +155,10 @@ end
-- print a sync url to console to test matrix connection in other applications
function MatrixChat:get_access_url()
local params = {}
-- no filter param
if self.since ~= nil then
params[1] = "since=" .. self.since
table.insert(params, "since=" .. self.since)
end
params[2] = "access_token=" .. self.token
table.insert(params, "access_token=" .. self.token)
local u = self.server .. "/_matrix/client/r0/sync?" .. table.concat(params, "&")
print(u)
end