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:
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