录单
This commit is contained in:
@@ -38,6 +38,7 @@ public class WXUtil {
|
||||
public static Map<String, SuperAdmin> super_admins = new HashMap<>();
|
||||
public static Map<String, String> jdidToWxidMap = new HashMap<>();
|
||||
public static Map<String, String> jdidToRemarkMap = new HashMap<>();
|
||||
public static List<String> notify_wx = new ArrayList<>();
|
||||
|
||||
// 群聊管理白名单
|
||||
public static List<String> chatRoom_admin = new ArrayList<>();
|
||||
@@ -226,12 +227,15 @@ public class WXUtil {
|
||||
String messageContent = "Jarvis 更新完成 [亲亲][亲亲][亲亲] ";
|
||||
String fromWxid = default_bot_wxid; // 来源为机器人自身
|
||||
for (SuperAdmin admin : super_admins.values()) {
|
||||
try {
|
||||
// 异步发送,不影响启动流程
|
||||
CompletableFuture.runAsync(() -> sendTextMessage(admin.getWxid(), messageContent, 1, fromWxid, false));
|
||||
} catch (Exception e) {
|
||||
logger.warn("发送重启通知失败,目标 wxid: {}", admin.getWxid(), e);
|
||||
if (!notify_wx.contains(admin.getWxid())){
|
||||
try {
|
||||
sendTextMessage(admin.getWxid(), messageContent, 1, fromWxid, false);
|
||||
notify_wx.add(admin.getWxid());
|
||||
} catch (Exception e) {
|
||||
logger.warn("发送重启通知失败,目标 wxid: {}", admin.getWxid(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
restartNoticeSent = true;
|
||||
|
||||
Reference in New Issue
Block a user