CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 SimulationData.java 源代码,内容仅作参考
package ak;
import ak.im.module.IMMessage;
import ak.im.sdk.manager.MessageManager;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager;
public class SimulationData implements Serializable {
static List<HashMap<String, String>> a = new ArrayList();
static HashMap<String, String> f136b = null;
public static String message_prop_type_notification = "message.prop.type.notification";
public static String plain = "plain";
private static void a(String str, String str2) {
HashMap<String, String> hashMap = new HashMap<>();
f136b = hashMap;
hashMap.put(Message.BODY, str2);
f136b.put("type", str);
a.add(f136b);
}
public static Message assembleNotificationMsg(Message message) {
Message message2 = new Message();
c(message2);
message2.setFrom("notification_friendsandmucrooms@notification.xmppdomain");
message2.setType(Message.Type.chat);
JivePropertiesManager.addProperty(message2, IMMessage.PROP_TYPE, message_prop_type_notification);
JivePropertiesManager.addProperty(message2, IMMessage.PROP_SECURITY, plain);
JivePropertiesManager.addProperty(message2, IMMessage.PROP_TIMES_TAMP, MessageManager.getStringProperty(message, IMMessage.PROP_TIMES_TAMP));
JivePropertiesManager.addProperty(message2, "message.prop.seqno", MessageManager.getStringProperty(message, IMMessage.PROP_SEQNO));
JivePropertiesManager.addProperty(message2, IMMessage.PROP_ID, MessageManager.getStringProperty(message, IMMessage.PROP_ID));
return message2;
}
private static int b() {
a("friendsandmucrooms_notification.friend_request", "{ \n \"\\\\\": \"好友申请消息__被申请者\",\n \"requester\": \"u997276823644\",\n \"receiver\" : \"u915723398127\", \n \"reason\": \"我是1825\"\n}");
a("friendsandmucrooms_notification.friend_request", "{ \n \"\\\\\": \"好友申请消息__申请者\",\n \"requester\": \"u915723398127\",\n \"receiver\": \"u997276823644\",\n \n \"reason\": \"我是1825\"\n}");
a("friendsandmucrooms_notification.friend_request_accepted", "{\n \"\\\\\": \"同意好友申请消息__申请者\",\n \"requester\":\"u915723398127\",\t\t\n \"receiver\":\"u997276823644\"\n}");
a("friendsandmucrooms_notification.friend_request_accepted", "{\n \"\\\\\": \"同意好友申请消息__被申请者\",\n \"requester\":\"u997276823644\",\t\t\n \"receiver\":\"u915723398127\"\n }");
a("friendsandmucrooms_notification.friend_request_rejected", "{\n \"\\\\\": \"拒绝好友申请消息__申请者\",\n \"requester\":\"u915723398127\",\t\t\n \"receiver\":\"u997276823644\"\n}");
a("friendsandmucrooms_notification.friend_request_rejected", "{\n \"\\\\\": \"拒绝好友申请消息__被申请者\",\n \"requester\":\"u997276823644\",\t\t\n \"receiver\":\"u915723398127\"\n }");
a("friendsandmucrooms_notification.friend_deleted", " {\n \"\\\\\": \"好友关系解除消息__被申请者\",\n \"requester\":\"u997276823644\",\t\t\n \"receiver\":\"u915723398127\"\n}");
return a.size();
}
private static void c(Message message) {
HashMap<String, String> hashMap = a.get((int) (Math.random() * ((b() - 1) + 1)));
f136b = hashMap;
message.addBody("zh", hashMap.get(Message.BODY));
JivePropertiesManager.addProperty(message, IMMessage.PROP_NOTIFICATION_MSGTYPE, f136b.get("type"));
}
}