aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Account.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java8
4 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java
index 8d750bf5c..222e33b3b 100644
--- a/src/main/java/de/pixart/messenger/entities/Account.java
+++ b/src/main/java/de/pixart/messenger/entities/Account.java
@@ -653,7 +653,7 @@ public class Account extends AbstractEntity {
public String getShareableUri() {
List<XmppUri.Fingerprint> fingerprints = this.getFingerprints();
- String uri = "xmpp:" + this.getJid().asBareJid().toString();
+ String uri = "xmpp:" + this.getJid().asBareJid().toEscapedString();
if (fingerprints.size() > 0) {
return XmppUri.getFingerprintUri(uri,fingerprints,';');
} else {
@@ -662,7 +662,7 @@ public class Account extends AbstractEntity {
}
public String getShareableLink() {
List<XmppUri.Fingerprint> fingerprints = this.getFingerprints();
- String uri = Config.inviteUserURL+this.getJid().asBareJid().toString();
+ String uri = Config.inviteUserURL + this.getJid().asBareJid().toEscapedString();
if (fingerprints.size() > 0) {
return XmppUri.getFingerprintUri(uri,fingerprints,'&');
} else {
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
index dae489e18..cbcd573b9 100644
--- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
@@ -374,9 +374,9 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
protected String getShareableUri(boolean http) {
if (mConversation != null) {
if (http) {
- return Config.inviteMUCURL + mConversation.getJid().asBareJid();
+ return Config.inviteMUCURL + mConversation.getJid().asBareJid().toEscapedString();
} else {
- return "xmpp:" + mConversation.getJid().asBareJid() + "?join";
+ return "xmpp:" + mConversation.getJid().asBareJid().toEscapedString() + "?join";
}
} else {
return null;
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
index 4726922bf..ce4dad47e 100644
--- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
@@ -231,7 +231,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
protected String getShareableUri(boolean http) {
final String prefix = http ? Config.inviteUserURL : "xmpp:";
if (contact != null) {
- return prefix + contact.getJid().asBareJid().toString();
+ return prefix + contact.getJid().asBareJid().toEscapedString();
} else {
return "";
}
diff --git a/src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java b/src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java
index 9e26439c2..58d2a8b68 100644
--- a/src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java
+++ b/src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java
@@ -20,26 +20,26 @@ public class AbstractStanza extends Element {
public void setTo(final Jid to) {
if (to != null) {
- setAttribute("to", to.toString());
+ setAttribute("to", to.toEscapedString());
}
}
public void setFrom(final Jid from) {
if (from != null) {
- setAttribute("from", from.toString());
+ setAttribute("from", from.toEscapedString());
}
}
public boolean fromServer(final Account account) {
return getFrom() == null
- || getFrom().equals(account.getServer())
+ || getFrom().equals(Jid.of(account.getServer()))
|| getFrom().equals(account.getJid().asBareJid())
|| getFrom().equals(account.getJid());
}
public boolean toServer(final Account account) {
return getTo() == null
- || getTo().equals(account.getServer())
+ || getTo().equals(Jid.of(account.getServer()))
|| getTo().equals(account.getJid().asBareJid())
|| getTo().equals(account.getJid());
}