From 3eb974548535c4acf362c3c6e9388791f9137303 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 23 Apr 2020 14:31:44 +0800 Subject: [PATCH] Fix #231, fix #254 --- .../network/protocol/packet/chat/receive/OnlinePush.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt index 6b827f93f..f94ab84c5 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt @@ -82,7 +82,7 @@ internal class OnlinePush { val sender = group[pbPushMsg.msg.msgHead.fromUin] as MemberImpl val name = extraInfo?.groupCard?.run { kotlin.runCatching { - if (this[0] == 0x0A.toByte() && this[1] == 0x0A.toByte() && this[2] == 0x0A.toByte() && this[3] == 0x08.toByte()) + if (this[0] == 0x0A.toByte()) loadAs(Oidb0x8fc.CommCardNameBuf.serializer()).richCardName?.firstOrNull { it.text.isNotEmpty() } ?.text?.encodeToString() else return@runCatching null