mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: at
メッセージ優先name
パラメータ
This commit is contained in:
parent
9608b46799
commit
cf943fd13a
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user