First pass at client:sync()
For the moment only the amount of iterations, or processing events foerever, can be specified. The timeout is not yet configurable.
This commit is contained in:
@@ -420,6 +420,15 @@ function Client:_sync(options)
|
||||
end
|
||||
end
|
||||
|
||||
function Client:sync(niters)
|
||||
while niters == nil or niters > 0 do
|
||||
self:_sync { timeout = 15000 }
|
||||
if niters then
|
||||
niters = niters - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Client:_sync_handle_room__join(room_id, data)
|
||||
local room = self:_make_room(room_id)
|
||||
room:_push_events(data.timeline.events)
|
||||
|
||||
Reference in New Issue
Block a user