From 180a0e44084752431d702677d68d06ae82524d33 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sun, 9 Nov 2014 10:57:22 -0500 Subject: Rework `Account.getJid()' to return full JIDs Remove `Account.getFullJid()' --- src/main/java/eu/siacs/conversations/parser/IqParser.java | 2 +- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 2 +- src/main/java/eu/siacs/conversations/parser/PresenceParser.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/parser') diff --git a/src/main/java/eu/siacs/conversations/parser/IqParser.java b/src/main/java/eu/siacs/conversations/parser/IqParser.java index b864329e..d5d1f3a0 100644 --- a/src/main/java/eu/siacs/conversations/parser/IqParser.java +++ b/src/main/java/eu/siacs/conversations/parser/IqParser.java @@ -68,7 +68,7 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { public void onIqPacketReceived(Account account, IqPacket packet) { if (packet.hasChild("query", "jabber:iq:roster")) { final Jid from = packet.getFrom(); - if ((from == null) || (from.equals(account.getJid()))) { + if ((from == null) || (from.equals(account.getJid().toBareJid()))) { Element query = packet.findChild("query"); this.rosterItems(account, query); } diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 70d5b12b..e4ae2701 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -347,7 +347,7 @@ public class MessageParser extends AbstractParser implements avatar.owner = from; if (mXmppConnectionService.getFileBackend().isAvatarCached( avatar)) { - if (account.getJid().equals(from)) { + if (account.getJid().toBareJid().equals(from)) { if (account.setAvatar(avatar.getFilename())) { mXmppConnectionService.databaseBackend .updateAccount(account); diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java index ba3f1645..bd487c79 100644 --- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java @@ -55,7 +55,7 @@ public class PresenceParser extends AbstractParser implements } final Jid from = packet.getFrom(); String type = packet.getAttribute("type"); - if (from.toBareJid().equals(account.getJid())) { + if (from.toBareJid().equals(account.getJid().toBareJid())) { if (!from.getResourcepart().isEmpty()) { if (type == null) { account.updatePresence(from.getResourcepart(), -- cgit v1.2.3