aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-03-31 22:52:51 +0200
committerChristian Schneppe <christian@pix-art.de>2018-03-31 22:52:51 +0200
commit3bf58e41dfba1af10bbd6ec8c10f6bfd23924c69 (patch)
treea879a3fc7ee206cf442015954c760d90f5bb6a61 /src/main/java/de
parentd68e780a91633c1336c31da54c45ec8cdd7ee5cf (diff)
do not redirect to StarConversationActivity when scanning invalid jid
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
index d71feb3f7..47355ecba 100644
--- a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
@@ -104,11 +104,14 @@ public class UriHandlerActivity extends AppCompatActivity {
intent.setAction(Intent.ACTION_VIEW);
intent.putExtra("jid", xmppUri.getJid().toBareJid().toString());
intent.setData(uri);
- } else {
+ } else if (xmppUri.isJidValid()) {
intent = new Intent(getApplicationContext(), StartConversationActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.setData(uri);
+ } else {
+ Toast.makeText(this, R.string.invalid_jid, Toast.LENGTH_SHORT).show();
+ return;
}
startActivity(intent);