Add pingSession

This commit is contained in:
insweater 2015-02-05 17:48:26 +03:00
parent 0990bcb4d6
commit 0b7235b450

View File

@ -41,4 +41,11 @@ function GJ.openSession()
return string.find(req("sessions/open/?", "dump", true, true), "SUCCESS") ~= nil
end
function GJ.pingSession(active)
local status = "idle"
if active then status = "active" end
return string.find(req("sessions/open/?status=" .. status, "dump", true, true), "SUCCESS") ~= nil
end
return GJ