aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp/stanzas
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-07 23:32:24 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-07 23:32:24 +0200
commitdb59b15ed94eaebe6932d7bc9eaceadf9bc1a4f3 (patch)
tree0ac757efee9c80754bf4fd0401f73688bd5e4379 /src/main/java/de/pixart/messenger/xmpp/stanzas
parent903a3d17f2055bdc5ba4f316419b158ce453bfda (diff)
use escaped form of jid where approriate
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp/stanzas')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/stanzas/AbstractStanza.java8
1 files changed, 4 insertions, 4 deletions
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());
}