CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e

以下内容为反编译后的 h0.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 org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;

public class h0 extends IQ {

    private final String f48302a;

    private final String f48303b;

    private final String f48304c;

    private String f48305d;

    private Akeychat.OpBaseResult f48306e;

    public static class b extends IQProvider {
        @Override
        public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
            h0 h0Var = new h0();
            Log.i("CopuGroupExtension", "start parse iq result in CopuGroupExtension");
            boolean z10 = false;
            while (!z10) {
                int next = xmlPullParser.next();
                if (next == 4) {
                    h0Var.parseResults(xmlPullParser);
                } else if (next == 3 && xmlPullParser.getName().equals("mucroom")) {
                    z10 = true;
                }
            }
            Log.i("CopuGroupExtension", "end parse iq result in copy group ext:" + ((Object) h0Var.getChildElementXML()));
            return h0Var;
        }
    }

    @Override
    protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
        iQChildElementXmlStringBuilder.append(">");
        if (this.f48303b != null) {
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put(Group.ROOM_NAME, this.f48303b);
                jSONObject.put("type", this.f48304c);
            } catch (JSONException e10) {
                e10.printStackTrace();
                Log.w(this.f48302a, "illegal group params,copy group failed.");
            }
            iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
        } else {
            String str = this.f48305d;
            if (str != null) {
                iQChildElementXmlStringBuilder.optElement("result", str);
            }
        }
        return iQChildElementXmlStringBuilder;
    }

    public Akeychat.OpBaseResult getmResponse() {
        return this.f48306e;
    }

    protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
        try {
            String text = xmlPullParser.getText();
            this.f48305d = text;
            this.f48306e = Akeychat.OpBaseResult.parseFrom(e.e.decode(text));
        } catch (Exception e10) {
            Log.w(this.f48302a, "encounter excp in parse results" + e10.getMessage());
        }
    }

    private h0() {
        super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#copy");
        setType(IQ.Type.set);
        setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
        setFrom(bf.getInstance().getUserMe().getJID());
        this.f48303b = null;
        this.f48304c = null;
        this.f48302a = getClass().getSimpleName();
    }

    public h0(String str, String str2) {
        super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#copy");
        setType(IQ.Type.set);
        setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
        setFrom(bf.getInstance().getUserMe().getJID());
        this.f48303b = str;
        this.f48304c = str2;
        this.f48302a = getClass().getSimpleName();
    }
}