diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index 6602e8aef..4a627837a 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -349,6 +349,8 @@ public class PresenceParser extends AbstractParser implements this.parseConferencePresence(packet, account); } else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) { this.parseConferencePresence(packet, account); + } else if ("error".equals(packet.getAttribute("type")) && mXmppConnectionService.isMuc(account, packet.getFrom())) { + this.parseConferencePresence(packet, account); } else { this.parseContactPresence(packet, account); } diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index f4e0bf877..896061457 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -568,6 +568,11 @@ public class XmppConnectionService extends Service { return find(getConversations(), account, jid); } + public boolean isMuc(final Account account, final Jid jid) { + final Conversation c = find(account, jid); + return c != null && c.getMode() == Conversational.MODE_MULTI; + } + public void search(List<String> term, OnSearchResultsAvailable onSearchResultsAvailable) { MessageSearchTask.search(this, term, onSearchResultsAvailable); } |