25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix delete_old_message when using sqlite spool table

This fixes issue #3503
This commit is contained in:
Paweł Chmielowski 2021-01-27 19:40:35 +01:00
parent 5c3b3d22db
commit f7004f793d

View File

@ -94,6 +94,11 @@ remove_old_messages(Days, LServer) ->
?SQL("DELETE FROM spool"
" WHERE created_at <"
" NOW() - %(Days)d * INTERVAL '1 DAY'"));
(sqlite, _) ->
ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool"
" WHERE created_at <"
" DATETIME('now', '-%(Days)d days')"));
(_, _) ->
ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool"