mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Fix delete_old_message when using sqlite spool table
This fixes issue #3503
This commit is contained in:
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…
Reference in New Issue
Block a user