CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 t3.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.nf;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.HashMap;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser;
public class t3 extends IQ {
private final String a;
private HashMap<String, JSONArray> f4682b;
private String f4683c;
private String f4684d;
private String f4685e;
private String f;
private String g;
private JSONArray h;
private boolean i;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
t3 t3Var = new t3();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
t3Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("muchistory")) {
z = true;
}
}
return t3Var;
}
}
public t3(JSONArray jSONArray) {
super("muchistory", "http://akey.im/protocol/xmpp/iq/muchistory");
this.a = "QueryGroupMessageIDListExtension";
this.f4683c = "return_code";
this.f4684d = "descrtiption";
this.f4685e = "muchistorys";
this.f = ParserUtils.JID;
this.g = "message_id_list";
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(nf.getInstance().getUserMe().getJID());
this.h = jSONArray;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
JSONArray jSONArray = this.h;
if (jSONArray != null) {
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONArray);
} else {
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, "[]");
}
return iQChildElementXmlStringBuilder;
}
public HashMap<String, JSONArray> getQueryMsgsResult() {
return this.f4682b;
}
public boolean isQuerySuccess() {
return this.i;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
JSONObject parseObject = JSON.parseObject(xmlPullParser.getText());
String string = parseObject.getString(this.f4683c);
String string2 = parseObject.getString(this.f4684d);
if (!string.equals("0")) {
Log.w("QueryGroupMessageIDListExtension", "return code is :" + string + ",des:" + string2);
return;
}
JSONArray jSONArray = parseObject.getJSONArray(this.f4685e);
if (this.f4682b == null) {
this.f4682b = new HashMap<>();
}
for (int i = 0; i < jSONArray.size(); i++) {
try {
JSONObject jSONObject = jSONArray.getJSONObject(i);
String string3 = jSONObject.getString(this.f);
JSONArray jSONArray2 = jSONObject.getJSONArray(this.g);
if (string3 != null && string3.length() > 4) {
this.f4682b.put(string3, jSONArray2);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
this.i = true;
} catch (JSONException e3) {
e3.printStackTrace();
Log.w("QueryGroupMessageIDListExtension", "encounter excp in parse results" + e3.getMessage());
} catch (Exception e4) {
Log.w("QueryGroupMessageIDListExtension", "encounter excp in parse results" + e4.getMessage());
}
}
public t3() {
super("muchistory", "http://akey.im/protocol/xmpp/iq/muchistory");
this.a = "QueryGroupMessageIDListExtension";
this.f4683c = "return_code";
this.f4684d = "descrtiption";
this.f4685e = "muchistorys";
this.f = ParserUtils.JID;
this.g = "message_id_list";
}
}