special treatment for presence errors known to be mucs
This commit is contained in:
parent
320eb46515
commit
cbea85c4dd
|
@ -353,6 +353,8 @@ public class PresenceParser extends AbstractParser implements
|
||||||
this.parseConferencePresence(packet, account);
|
this.parseConferencePresence(packet, account);
|
||||||
} else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) {
|
} else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) {
|
||||||
this.parseConferencePresence(packet, account);
|
this.parseConferencePresence(packet, account);
|
||||||
|
} else if ("error".equals(packet.getAttribute("type")) && mXmppConnectionService.isMuc(account, packet.getFrom())) {
|
||||||
|
this.parseConferencePresence(packet, account);
|
||||||
} else {
|
} else {
|
||||||
this.parseContactPresence(packet, account);
|
this.parseContactPresence(packet, account);
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,6 +547,11 @@ public class XmppConnectionService extends Service {
|
||||||
return find(getConversations(), account, jid);
|
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) {
|
public void search(List<String> term, OnSearchResultsAvailable onSearchResultsAvailable) {
|
||||||
MessageSearchTask.search(this, term, onSearchResultsAvailable);
|
MessageSearchTask.search(this, term, onSearchResultsAvailable);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue