diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_offline_sql.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mod_offline_sql.erl b/src/mod_offline_sql.erl index 95d379c6..4e8441b7 100644 --- a/src/mod_offline_sql.erl +++ b/src/mod_offline_sql.erl @@ -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" |