fixed cache cleaning of muc avatars, fixes #3296

This commit is contained in:
Daniel Gultsch 2018-11-29 19:27:18 +01:00
parent c93556e05b
commit 6381f8a7f7
1 changed files with 5 additions and 1 deletions

View File

@ -1693,10 +1693,14 @@ public class XmppConnectionService extends Service {
return this.accounts; 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<Conversation> findAllConferencesWith(Contact contact) { public List<Conversation> findAllConferencesWith(Contact contact) {
ArrayList<Conversation> results = new ArrayList<>(); ArrayList<Conversation> results = new ArrayList<>();
for (final Conversation c : conversations) { 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); results.add(c);
} }
} }