trim xmpp address after user input

This commit is contained in:
Daniel Gultsch 2022-11-25 08:50:58 +01:00
parent f4be142e4d
commit 63501adc45
2 changed files with 2 additions and 2 deletions

View file

@ -170,7 +170,7 @@ public class EnterJidDialog extends DialogFragment implements OnBackendConnected
} }
final Jid contactJid; final Jid contactJid;
try { try {
contactJid = Jid.ofEscaped(binding.jid.getText().toString()); contactJid = Jid.ofEscaped(binding.jid.getText().toString().trim());
} catch (final IllegalArgumentException e) { } catch (final IllegalArgumentException e) {
binding.jidLayout.setError(getActivity().getString(R.string.invalid_jid)); binding.jidLayout.setError(getActivity().getString(R.string.invalid_jid));
return; return;

View file

@ -1054,7 +1054,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (account == null) { if (account == null) {
return; return;
} }
final String input = jid.getText().toString(); final String input = jid.getText().toString().trim();
Jid conferenceJid; Jid conferenceJid;
try { try {
conferenceJid = Jid.ofEscaped(input); conferenceJid = Jid.ofEscaped(input);