diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Contact.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index 0b6c900a1..a451c142a 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -145,10 +145,10 @@ public class Contact implements ListItem { } public boolean match(String needle) { - if (needle == null) { + if (needle == null || needle.isEmpty()) { return true; } - needle = needle.toLowerCase(); + needle = needle.toLowerCase().trim(); String[] parts = needle.split("\\s+"); if (parts.length > 1) { for(int i = 0; i < parts.length; ++i) { |