aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-09-21 19:04:16 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-09-21 19:04:16 +0200
commit343d895a26a3314cda34ad705e7a56198a848c66 (patch)
tree1c1b0a059b96408047640176eae9636f11105e99 /src/main/java
parent13ed27f91ed6ac29a8f0524467599fb4ec0080bc (diff)
don't react to null and empty voice replies
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 3c48a308..bccffbff 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -573,9 +573,10 @@ public class XmppConnectionService extends Service {
case ACTION_REPLY_TO_CONVERSATION:
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
if (remoteInput != null && c != null) {
-
- String body = remoteInput.getString("text_reply");
- directReply(c,body);
+ final CharSequence body = remoteInput.getCharSequence("text_reply");
+ if (body != null && body.length() > 0) {
+ directReply(c, body.toString());
+ }
}
break;
case AudioManager.RINGER_MODE_CHANGED_ACTION: