From 6381f8a7f7ab89f9ee6821ccfdc10a412e387139 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 29 Nov 2018 19:27:18 +0100 Subject: [PATCH] fixed cache cleaning of muc avatars, fixes #3296 --- .../siacs/conversations/services/XmppConnectionService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 0d5468232..2b43acd60 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1693,10 +1693,14 @@ 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); } }