Fix chat log message deletion query

Corrected the SQL query in the `deleteOldMessages` method within `ChatLogQueries.java`. Originally, it was incorrectly deleting newer messages rather than older ones due to an incorrect comparison symbol. It has now been adjusted to properly delete older messages based on the provided duration.
This commit is contained in:
Teriuihi 2024-04-07 19:16:32 +02:00
parent d6135f2456
commit 192fca3a89

View File

@ -82,7 +82,7 @@ public class ChatLogQueries {
}
public static CompletableFuture<Boolean> deleteOldMessages(Duration duration) {
String query = "DELETE FROM chat_log WHERE time_stamp > ?";
String query = "DELETE FROM chat_log WHERE time_stamp < ?";
return CompletableFuture.supplyAsync(() -> {
try (Connection connection = DatabaseConnection.getConnection()) {