aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Contact.java4
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 0b6c900a..a451c142 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) {