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