CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 g6.java 源代码,内容仅作参考
package y0;
import ak.im.module.Group;
import ak.im.sdk.manager.bf;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.ArrayList;
import java.util.Iterator;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class g6 extends IQ {
private final String f48291a;
private final String f48292b;
private String[] f48293c;
private String[] f48294d;
private Akeychat.MucRoomSetPropertiesResponse f48295e;
boolean f48296f;
public static class b extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
g6 g6Var = new g6();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
g6Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("mucroom")) {
z10 = true;
}
}
return g6Var;
}
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f48296f) {
Akeychat.MucRoomSetPropertiesRequest.b newBuilder = Akeychat.MucRoomSetPropertiesRequest.newBuilder();
newBuilder.setMucroommname(this.f48292b);
int i10 = 0;
for (String str : this.f48293c) {
if ("subject".equals(str)) {
newBuilder.setSubject(this.f48294d[i10]);
} else if (Group.NEWS.equals(str)) {
newBuilder.setNews(this.f48294d[i10]);
} else if (Group.SECURITY.equals(str)) {
newBuilder.setSecurity(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.AVATAR_URL.equals(str)) {
newBuilder.setAvatarUrl(this.f48294d[i10]);
} else if (Group.ONLY_OWNER_VOICE.equals(str)) {
newBuilder.setOnlyOwnerVoice(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.ONLY_AUDIO.equals(str)) {
newBuilder.setOnlyAudio(Boolean.parseBoolean(this.f48294d[i10]));
} else if ("akeyid".equals(str)) {
newBuilder.setAkeyid(this.f48294d[i10]);
} else if (Group.AKEY_ID_SEARCH_SWITCH.equals(str)) {
newBuilder.setAkeyidsearch(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.SCREEN_SHOT_PUNISH.equals(str)) {
boolean parseBoolean = Boolean.parseBoolean(this.f48294d[i10]);
if (parseBoolean && !ak.im.sdk.manager.f1.getInstance().isOldServer(j.u0.f40421r0)) {
newBuilder.setReadonlyScreenshotPunish(true);
}
newBuilder.setScreenshotPunish(parseBoolean);
} else if (Group.READ_SCREEN_SHOT_PUNISH.equals(str)) {
newBuilder.setReadonlyScreenshotPunish(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.PUBLIC_GROUP.equals(str)) {
newBuilder.setIsPublic(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.BLACK_BOARD.equals(str)) {
newBuilder.setMemberSendTopMessage(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.GROUP_MANAGER.equals(str)) {
Group groupBySimpleName = ak.im.sdk.manager.b5.getInstance().getGroupBySimpleName(this.f48292b);
if (groupBySimpleName != null) {
ArrayList arrayList = new ArrayList();
for (String str2 : groupBySimpleName.getmGroupManagerMap().keySet()) {
if (Boolean.parseBoolean(this.f48294d[i10 + 1]) || !str2.equals(this.f48294d[i10])) {
arrayList.add(str2);
}
}
if (Boolean.parseBoolean(this.f48294d[i10 + 1])) {
arrayList.add(this.f48294d[i10]);
}
if (arrayList.size() < 1) {
newBuilder.setEmptyMucroomManagers(true);
} else {
newBuilder.setEmptyMucroomManagers(false);
}
Iterator it = arrayList.iterator();
while (it.hasNext()) {
newBuilder.addMucroomManagers((String) it.next());
}
}
} else if (Group.JOIN_DIRECT.equals(str)) {
newBuilder.setAutoRequestAgree(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.ALLOW_REMOTE_DESTORY.equals(str)) {
newBuilder.setRemoteDestroyAllowed(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.MEMBER_HIDE.equals(str)) {
newBuilder.setMemberHide(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.FORBIDDEN_CHECK_MEM_INFO.equals(str)) {
newBuilder.setBanViewMemberInfo(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.FORBIDDEN_BURN.equals(str)) {
newBuilder.setForbiddenBurn(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.BAN_SPEAK_MEMS.equals(str)) {
Group groupBySimpleName2 = ak.im.sdk.manager.b5.getInstance().getGroupBySimpleName(this.f48292b);
if (groupBySimpleName2 != null) {
ArrayList arrayList2 = new ArrayList();
for (String str3 : groupBySimpleName2.getBanSpeakMembers()) {
if (Boolean.parseBoolean(this.f48294d[i10 + 1]) || !str3.equals(this.f48294d[i10])) {
arrayList2.add(str3);
}
}
if (Boolean.parseBoolean(this.f48294d[i10 + 1])) {
arrayList2.add(this.f48294d[i10]);
}
if (arrayList2.size() < 1) {
newBuilder.setEmptyBanSpeakMembers(true);
} else {
newBuilder.setEmptyBanSpeakMembers(false);
}
Iterator it2 = arrayList2.iterator();
while (it2.hasNext()) {
newBuilder.addBanSpeakMembers((String) it2.next());
}
}
} else if (Group.GROUP_INFO_PROHIBITED.equals(str)) {
newBuilder.setGroupInfoProhibited(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.GROUP_ALLOW_MEMBERS_VOTE.equals(str)) {
newBuilder.setAllowMembersVote(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.GROUP_NICKNAME_PROHIBITED.equals(str)) {
newBuilder.setForbidModGroupNickname(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.SIGN_IN_SWITCH.equals(str)) {
newBuilder.setSignInSwitch(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.SIGN_IN_PUBLIC.equals(str)) {
newBuilder.setSignInPublic(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.SIGN_IN_AUTO.equals(str)) {
newBuilder.setSignInAuto(Boolean.parseBoolean(this.f48294d[i10]));
} else if (Group.SIGN_IN_MESSAGE.equals(str)) {
newBuilder.setSignInMessage(this.f48294d[i10]);
} else if (Group.LEAVE_GROUP_REMIND.equals(str)) {
newBuilder.setLeaveGroupRemind(Boolean.parseBoolean(this.f48294d[i10]));
} else if ("group_allow_send_card".equals(str)) {
newBuilder.setAllowMembersSendCards(Boolean.parseBoolean(this.f48294d[i10]));
} else if ("group_speak_frequency".equals(str)) {
Log.d("UpdateGroupInfoExtension", "send message limit value is " + this.f48294d[i10]);
newBuilder.setSendMessageLimit(Akeychat.SendMessageLimit.valueOf(Integer.parseInt(this.f48294d[i10])));
} else if ("group_message_store_day".equals(str)) {
newBuilder.setGroupMessageStoreDay(Integer.valueOf(str).intValue());
} else if ("allow_group_muc".equalsIgnoreCase(str)) {
newBuilder.setAllowMembersVoip(Boolean.parseBoolean(this.f48294d[i10]));
}
i10++;
}
Akeychat.MucRoomSetPropertiesRequest build = newBuilder.build();
Log.debug("UpdateGroupInfoExtension", "updatenew is " + build.toString());
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, e.e.encodeBytes(build.toByteArray()));
} else {
iQChildElementXmlStringBuilder.optElement("result", this.f48295e);
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.MucRoomSetPropertiesResponse getmUpdateResult() {
return this.f48295e;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f48295e = Akeychat.MucRoomSetPropertiesResponse.parseFrom(e.e.decode(text));
Log.i("UpdateGroupInfoExtension", "update reuslt:" + this.f48295e.getListversioncode() + ",txt:" + text + ",return code:" + this.f48295e.getResult().getReturnCode());
} catch (Exception e10) {
Log.w("UpdateGroupInfoExtension", "encounter excp in parse results" + e10.getMessage());
}
}
private g6() {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#updatenew");
this.f48291a = "UpdateGroupInfoExtension";
this.f48292b = null;
}
public g6(String str, String[] strArr, String[] strArr2) {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#updatenew");
this.f48291a = "UpdateGroupInfoExtension";
setType(IQ.Type.set);
this.f48296f = true;
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(bf.getInstance().getUserMe().getJID());
this.f48292b = str;
if (strArr != null && strArr2 != null) {
this.f48293c = strArr;
this.f48294d = strArr2;
return;
}
throw new RuntimeException("akeychat-illegal arguments,p:" + strArr + ",v:" + strArr2);
}
}