do not redirect to StarConversationActivity when scanning invalid jid

This commit is contained in:
Daniel Gultsch 2018-02-26 17:12:40 +01:00
parent 13322a568a
commit 3bd42230f2
1 changed files with 4 additions and 1 deletions

View File

@ -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);