Compare commits
9
Commits
2946b55810
...
5062c9dd15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5062c9dd15
|
||
|
|
f844be04b0
|
||
|
|
eb8fff42bf
|
||
|
|
d94c1342b0
|
||
|
|
cb4945d469
|
||
|
|
5bbb2e6afa
|
||
|
|
5756d8ba39
|
||
|
|
9e95b1fd78
|
||
|
|
151355a790 |
+1
-1
@@ -88,7 +88,7 @@ function API:sync(options)
|
|||||||
filter = options.filter,
|
filter = options.filter,
|
||||||
since = options.since,
|
since = options.since,
|
||||||
full_state = options.full or false,
|
full_state = options.full or false,
|
||||||
set_presence = online and nil or "offline",
|
set_presence = options.online and nil or "offline",
|
||||||
timeout = options.timeout,
|
timeout = options.timeout,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ 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
|
||||||
@@ -445,6 +446,9 @@ function Client:_sync(options)
|
|||||||
|
|
||||||
for _, kind in ipairs { "join", "invite", "leave" } do
|
for _, kind in ipairs { "join", "invite", "leave" } do
|
||||||
local handle = self["_sync_handle_room__" .. kind]
|
local handle = self["_sync_handle_room__" .. kind]
|
||||||
|
if response.rooms == nil or response.rooms[kind] == nil then
|
||||||
|
self._log("sync: Error syncing rooms (nil value)")
|
||||||
|
else
|
||||||
for room_id, room_data in pairs(response.rooms[kind]) do
|
for room_id, room_data in pairs(response.rooms[kind]) do
|
||||||
self._log("sync: %s %s", kind, room_id)
|
self._log("sync: %s %s", kind, room_id)
|
||||||
-- XXX: Maybe this is abusing pcall() too much to allow handler
|
-- XXX: Maybe this is abusing pcall() too much to allow handler
|
||||||
@@ -458,6 +462,7 @@ function Client:_sync(options)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function return_false()
|
local function return_false()
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -9,16 +9,18 @@
|
|||||||
local urlescape = require "socket.url" .escape
|
local urlescape = require "socket.url" .escape
|
||||||
local stringsource = require "ltn12" .source.string
|
local stringsource = require "ltn12" .source.string
|
||||||
local tablesink = require "ltn12" .sink.table
|
local tablesink = require "ltn12" .sink.table
|
||||||
|
local request_https = require "ssl.https" .request
|
||||||
|
local request_http = require "socket.http" .request
|
||||||
|
|
||||||
local request_https = function (...)
|
-- local request_https = function (...)
|
||||||
request_https = require "ssl.https" .request
|
-- request_https = require "ssl.https" .request
|
||||||
return request_https(...)
|
-- return request_https(...)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local request_http = function (...)
|
-- local request_http = function (...)
|
||||||
request_http = require "socket.http" .request
|
-- request_http = require "socket.http" .request
|
||||||
return request_http(...)
|
-- return request_http(...)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function make_request(t)
|
local function make_request(t)
|
||||||
if t.url:sub(1, #"https://") == "https://" then
|
if t.url:sub(1, #"https://") == "https://" then
|
||||||
|
|||||||
Reference in New Issue
Block a user