Fix delete_old_message when using sqlite spool table

This fixes issue #3503
pull/3510/head
Paweł Chmielowski 2 years ago
parent 5c3b3d22db
commit f7004f793d

@ -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"

Loading…
Cancel
Save