diff --git a/src/main/java/app/entities/messages/MessageSearch.java b/src/main/java/app/entities/messages/MessageSearch.java index 51c7713..170d690 100644 --- a/src/main/java/app/entities/messages/MessageSearch.java +++ b/src/main/java/app/entities/messages/MessageSearch.java @@ -20,7 +20,7 @@ public class MessageSearch { } public List getAccounts(ProfileService profileService) { - if (accounts == null) return null; + if (accounts == null || accounts.isEmpty()) return null; List filtered = accounts.stream() .map(profileService::GetSteamIDFromAnyData) @@ -40,10 +40,10 @@ public class MessageSearch { } public String getMessage() { - return message; + return message == null || message.isEmpty() ? null : "%"+message+"%"; } public String getServerId() { - return serverId; + return serverId == null || serverId.isEmpty() ? null : serverId; } }