aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-13 11:20:27 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-13 11:20:27 +0200
commitaced9d2697b02416d194695f23ad2d3c579fcf5d (patch)
tree0f308bac032045c435153e28205acdad253afe5b /src/main
parentb756d61c45f5cd3a3c69dd93115ad558f41de216 (diff)
do not process self presence
we don't want our own resource show up in the self contact
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/PresenceParser.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
index c6b234590..aea9002ac 100644
--- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
@@ -171,7 +171,7 @@ public class PresenceParser extends AbstractParser implements
public void parseContactPresence(final PresencePacket packet, final Account account) {
final PresenceGenerator mPresenceGenerator = mXmppConnectionService.getPresenceGenerator();
final Jid from = packet.getFrom();
- if (from == null) {
+ if (from == null || from.equals(account.getJid())) {
return;
}
final String type = packet.getAttribute("type");
@@ -199,7 +199,7 @@ public class PresenceParser extends AbstractParser implements
final String message = packet.findChildContent("status");
final Presence presence = Presence.parse(show, caps, message);
contact.updatePresence(resource, presence);
- if (presence.hasCaps() && !from.equals(account.getJid())) {
+ if (presence.hasCaps()) {
mXmppConnectionService.fetchCaps(account, from, presence);
}