diff --git a/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/msg/MessageMaker.kt b/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/msg/MessageMaker.kt index 9e999e4..35cb5c1 100644 --- a/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/msg/MessageMaker.kt +++ b/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/msg/MessageMaker.kt @@ -670,17 +670,22 @@ internal object MessageMaker { at.atNtUid = "0" } else -> { - val info = GroupSvc.getTroopMemberInfoByUinV2(peerId, qq, true).onFailure { - LogCenter.log("无法获取群成员信息: $qq", Level.ERROR) - }.getOrNull() - if (info != null) { - at.content = "@${ - info.troopnick - .ifNullOrEmpty(info.friendnick) - .ifNullOrEmpty(qq) - }" + val name = data["name"].asStringOrNull + if (name == null) { + val info = GroupSvc.getTroopMemberInfoByUinV2(peerId, qq, true).onFailure { + LogCenter.log("无法获取群成员信息: $qq", Level.ERROR) + }.getOrNull() + if (info != null) { + at.content = "@${ + info.troopnick + .ifNullOrEmpty(info.friendnick) + .ifNullOrEmpty(qq) + }" + } else { + at.content = "@$qq" + } } else { - at.content = "@${data["name"].asStringOrNull.ifNullOrEmpty(qq)}" + at.content = "@$name" } at.atType = MsgConstant.ATTYPEONE at.atNtUid = ContactHelper.getUidByUinAsync(qq.toLong())