diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-03-31 22:52:51 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-03-31 22:52:51 +0200 |
commit | 3bf58e41dfba1af10bbd6ec8c10f6bfd23924c69 (patch) | |
tree | a879a3fc7ee206cf442015954c760d90f5bb6a61 /src/main/java/de | |
parent | d68e780a91633c1336c31da54c45ec8cdd7ee5cf (diff) |
do not redirect to StarConversationActivity when scanning invalid jid
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java | 5 |
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); |