fetch new conference configuration on every conf update
This commit is contained in:
parent
9efef24a04
commit
f3ef8d4978
|
@ -127,7 +127,6 @@ public class MucOptions {
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String STATUS_CODE_ROOM_CONFIG_CHANGED = "104";
|
|
||||||
public static final String STATUS_CODE_SELF_PRESENCE = "110";
|
public static final String STATUS_CODE_SELF_PRESENCE = "110";
|
||||||
public static final String STATUS_CODE_ROOM_CREATED = "201";
|
public static final String STATUS_CODE_ROOM_CREATED = "201";
|
||||||
public static final String STATUS_CODE_BANNED = "301";
|
public static final String STATUS_CODE_BANNED = "301";
|
||||||
|
|
|
@ -587,16 +587,18 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (conversation != null && mucUserElement != null && from.isBareJid()) {
|
if (conversation != null && mucUserElement != null && from.isBareJid()) {
|
||||||
if (mucUserElement.hasChild("status")) {
|
|
||||||
for (Element child : mucUserElement.getChildren()) {
|
for (Element child : mucUserElement.getChildren()) {
|
||||||
if (child.getName().equals("status")
|
if ("status".equals(child.getName())) {
|
||||||
&& MucOptions.STATUS_CODE_ROOM_CONFIG_CHANGED.equals(child.getAttribute("code"))) {
|
try {
|
||||||
|
int code = Integer.parseInt(child.getAttribute("code"));
|
||||||
|
if ((code >= 170 && code <= 174) || (code >= 102 && code <= 104)) {
|
||||||
mXmppConnectionService.fetchConferenceConfiguration(conversation);
|
mXmppConnectionService.fetchConferenceConfiguration(conversation);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
//ignored
|
||||||
}
|
}
|
||||||
} else if (mucUserElement.hasChild("item")) {
|
} else if ("item".equals(child.getName())) {
|
||||||
for(Element child : mucUserElement.getChildren()) {
|
|
||||||
if ("item".equals(child.getName())) {
|
|
||||||
MucOptions.User user = AbstractParser.parseItem(conversation,child);
|
MucOptions.User user = AbstractParser.parseItem(conversation,child);
|
||||||
Log.d(Config.LOGTAG,account.getJid()+": changing affiliation for "
|
Log.d(Config.LOGTAG,account.getJid()+": changing affiliation for "
|
||||||
+user.getRealJid()+" to "+user.getAffiliation()+" in "
|
+user.getRealJid()+" to "+user.getAffiliation()+" in "
|
||||||
|
@ -611,7 +613,6 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue