From 6c2e3b91a4a7d9fcd75e228dccd989331e75af6c Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 30 Nov 2018 21:27:54 +0100 Subject: fixed cache cleaning of muc avatars --- src/main/java/de/pixart/messenger/entities/Conversation.java | 2 +- .../java/de/pixart/messenger/services/XmppConnectionService.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index b6179fa2e..5b7e490dc 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -565,7 +565,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl } else if ((QuickConversationsService.isConversations() || !Config.QUICKSY_DOMAIN.equals(contactJid.getDomain())) && isWithStranger()) { return contactJid; } else { - return this.getContact().getDisplayName();public PresencePacket requestPresenceUpdatesFrom(Contact contact) { + return this.getContact().getDisplayName(); } } diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index c435c1f35..b4fba14b2 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -1889,10 +1889,13 @@ public class XmppConnectionService extends Service { return this.accounts; } + /** + * This will find all conferences with the contact as member and also the conference that is the contact (that 'fake' contact is used to store the avatar) + */ public List findAllConferencesWith(Contact contact) { ArrayList results = new ArrayList<>(); for (final Conversation c : conversations) { - if (c.getMode() == Conversation.MODE_MULTI && c.getMucOptions().isContactInRoom(contact)) { + if (c.getMode() == Conversation.MODE_MULTI && (c.getJid().asBareJid().equals(contact.getJid().asBareJid()) || c.getMucOptions().isContactInRoom(contact))) { results.add(c); } } -- cgit v1.2.3