mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
fixed parsing of muc status messages in new message parser
This commit is contained in:
parent
3578263686
commit
46595b6d43
@ -364,13 +364,25 @@ public class MessageParser extends AbstractParser implements
|
|||||||
mXmppConnectionService.getNotificationService().push(message);
|
mXmppConnectionService.getNotificationService().push(message);
|
||||||
}
|
}
|
||||||
} else { //no body
|
} else { //no body
|
||||||
if (packet.hasChild("subject") && isTypeGroupChat) {
|
if (isTypeGroupChat) {
|
||||||
Conversation conversation = mXmppConnectionService.find(account, from.toBareJid());
|
Conversation conversation = mXmppConnectionService.find(account, from.toBareJid());
|
||||||
if (conversation != null && conversation.getMode() == Conversation.MODE_MULTI) {
|
if (packet.hasChild("subject")) {
|
||||||
conversation.setHasMessagesLeftOnServer(conversation.countMessages() > 0);
|
if (conversation != null && conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
conversation.getMucOptions().setSubject(packet.findChildContent("subject"));
|
conversation.setHasMessagesLeftOnServer(conversation.countMessages() > 0);
|
||||||
mXmppConnectionService.updateConversationUi();
|
conversation.getMucOptions().setSubject(packet.findChildContent("subject"));
|
||||||
return;
|
mXmppConnectionService.updateConversationUi();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final Element x = packet.findChild("x", "http://jabber.org/protocol/muc#user");
|
||||||
|
if (conversation != null && x != null && from.isBareJid()) {
|
||||||
|
for (Element child : x.getChildren()) {
|
||||||
|
if (child.getName().equals("status")
|
||||||
|
&& MucOptions.STATUS_CODE_ROOM_CONFIG_CHANGED.equals(child.getAttribute("code"))) {
|
||||||
|
mXmppConnectionService.fetchConferenceConfiguration(conversation);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user