FIX - harden phone stability and app controls (#28)

This commit is contained in:
DerEchteAlec
2026-08-22 19:48:30 +02:00
committed by GitHub
parent 2059e19e1c
commit cb6c94a7d8
36 changed files with 651 additions and 181 deletions
+7 -1
View File
@@ -931,10 +931,16 @@ end)
CreateThread(function()
while true do
Wait(Config.DarkChat.CleanupIntervalSeconds * 1000)
local batch_size = math.max(
1,
math.floor(tonumber(Config.DarkChat.CleanupBatchSize) or 250)
)
Bridge.Database.Query([[
DELETE FROM `sky_phone_darkchat_messages`
WHERE `expires_at` IS NOT NULL AND `expires_at` <= CURRENT_TIMESTAMP
]], {})
ORDER BY `expires_at`, `id`
LIMIT ?
]], { batch_size })
end
end)