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:
parent
d6135f2456
commit
192fca3a89
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user