aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-05-13 17:10:11 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-05-13 17:10:11 +0200
commit4414cf3b277ec7a0a015e23eab197374f3714da6 (patch)
treef1568573b4f019f76b1b8d8e5e32f7feef2c6478 /src/main/java/eu
parent82878cded1007331e953908dee11c66557e9ae20 (diff)
ignore question marks in location question
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index e289e0e5..51984c91 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -28,16 +28,18 @@ public class UIHelper {
public static final ArrayList<String> HEARTS = new ArrayList<>(Arrays.asList(BLACK_HEART_SUIT,HEAVY_BLACK_HEART_SUIT,WHITE_HEART_SUIT));
private static final ArrayList<String> LOCATION_QUESTIONS = new ArrayList<>(Arrays.asList(
- "where are you?", //en
- "where r u?", //en
- "whats your 20?", //en
- "what is your 20?", //en
- "what's your 20?", //en
- "whats your twenty?", //en
- "what is your twenty?", //en
- "what's your twenty?", //en
- "wo bist du?", //de
- "wo sind sie?" //de
+ "where are you", //en
+ "where r u", //en
+ "whats your 20", //en
+ "what is your 20", //en
+ "what's your 20", //en
+ "whats your twenty", //en
+ "what is your twenty", //en
+ "what's your twenty", //en
+ "wo bist du", //de
+ "wo sind sie", //de
+ "wo seid ihr", //de
+ "dónde estás" //es
));
private static final int SHORT_DATE_FLAGS = DateUtils.FORMAT_SHOW_DATE
@@ -256,6 +258,7 @@ public class UIHelper {
return false;
}
String body = message.getBody() == null ? null : message.getBody().trim().toLowerCase(Locale.getDefault());
+ body = body.replace("?","").replace("¿","");
return LOCATION_QUESTIONS.contains(body);
}
}