diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-05 20:56:55 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-05 20:56:55 +0200 |
commit | 6a4c366975dde87175b356084f2c258e782134e0 (patch) | |
tree | 0d29a8e5ce5554d509ff92ae41a0a3017be0a942 /src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | |
parent | 0446624c51942118e74fbba93d40d83a9856723d (diff) |
encode and decode % and # in invite links
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 0c2d1bb1d..d2aa75ca3 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -228,11 +228,10 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp @Override protected String getShareableUri(boolean http) { - final String prefix = http ? Config.inviteUserURL : "xmpp:"; - if (contact != null) { - return prefix + contact.getJid().asBareJid().toEscapedString(); + if (http) { + return Config.inviteUserURL + XmppUri.lameUrlEncode(contact.getJid().asBareJid().toEscapedString()); } else { - return ""; + return "xmpp:" + contact.getJid().asBareJid().toEscapedString(); } } |