Removed unused vars.
This commit is contained in:
parent
b532d5ca28
commit
427f0cc331
9
init.lua
9
init.lua
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
print("Matrix bridge loaded.")
|
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
|
||||||
dofile(modpath.."/config.lua")
|
dofile(modpath.."/config.lua")
|
||||||
@ -21,7 +19,6 @@ local MatrixChat = {
|
|||||||
userid = nil,
|
userid = nil,
|
||||||
token = nil,
|
token = nil,
|
||||||
since = nil,
|
since = nil,
|
||||||
lastok_since = nil,
|
|
||||||
eventid = nil
|
eventid = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +89,6 @@ function MatrixChat:sync(timeout)
|
|||||||
local response = minetest.parse_json(res.data)
|
local response = minetest.parse_json(res.data)
|
||||||
if response ~= nil then
|
if response ~= nil then
|
||||||
MatrixChat:minechat(response)
|
MatrixChat:minechat(response)
|
||||||
self.lastok_since = self.since
|
|
||||||
self.since = response.next_batch
|
self.since = response.next_batch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -159,11 +155,10 @@ end
|
|||||||
-- print a sync url to console to test matrix connection in other applications
|
-- print a sync url to console to test matrix connection in other applications
|
||||||
function MatrixChat:get_access_url()
|
function MatrixChat:get_access_url()
|
||||||
local params = {}
|
local params = {}
|
||||||
-- no filter param
|
|
||||||
if self.since ~= nil then
|
if self.since ~= nil then
|
||||||
params[1] = "since=" .. self.since
|
table.insert(params, "since=" .. self.since)
|
||||||
end
|
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, "&")
|
local u = self.server .. "/_matrix/client/r0/sync?" .. table.concat(params, "&")
|
||||||
print(u)
|
print(u)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user