aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/services/XmppConnectionService.java')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 0ead8c393..e7c587107 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2198,9 +2198,13 @@ public class XmppConnectionService extends Service {
* 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) {
- ArrayList<Conversation> results = new ArrayList<>();
+ final ArrayList<Conversation> results = new ArrayList<>();
for (final Conversation c : conversations) {
- if (c.getMode() == Conversation.MODE_MULTI && (c.getJid().asBareJid().equals(contact.getJid().asBareJid()) || c.getMucOptions().isContactInRoom(contact))) {
+ if (c.getMode() != Conversation.MODE_MULTI) {
+ continue;
+ }
+ final MucOptions mucOptions = c.getMucOptions();
+ if (c.getJid().asBareJid().equals(contact.getJid().asBareJid()) || (mucOptions != null && mucOptions.isContactInRoom(contact))) {
results.add(c);
}
}