]> granicus.if.org Git - ejabberd/commitdiff
Fix delete_old_messages command for SQL backends
authorJerome Sautret <jerome.sautret@process-one.net>
Mon, 10 Oct 2016 09:32:36 +0000 (11:32 +0200)
committerJerome Sautret <jerome.sautret@process-one.net>
Mon, 17 Oct 2016 15:02:23 +0000 (17:02 +0200)
src/mod_offline_sql.erl

index feefd3dd0f5b6a821e4a80e56574383268c89d96..d9de50e049bb26beda1e684d0c6c39b0acbdc761 100644 (file)
@@ -81,7 +81,7 @@ remove_old_messages(Days, LServer) ->
                 [<<"DELETE FROM spool"
                   " WHERE created_at < "
                   "NOW() - INTERVAL '">>,
-                 integer_to_list(Days), <<"';">>]) of
+                 integer_to_list(Days), <<"' DAY;">>]) of
        {updated, N} ->
            ?INFO_MSG("~p message(s) deleted from offline spool", [N]);
        _Error ->