From a520868994866c4d1ab38ef1335e7b2cc3ddc2e1 Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 31 Mar 2020 15:03:27 +0800 Subject: [PATCH] Fix at --- .../kotlin/net/mamoe/mirai/qqandroid/message/atImpl.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/atImpl.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/atImpl.kt index 72b9bbb07..38d88e8d0 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/atImpl.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/atImpl.kt @@ -12,11 +12,12 @@ package net.mamoe.mirai.qqandroid.message import kotlinx.io.core.buildPacket import kotlinx.io.core.readBytes import net.mamoe.mirai.message.data.At +import net.mamoe.mirai.message.data.AtAll import net.mamoe.mirai.qqandroid.network.protocol.data.proto.ImMsgBody internal fun At.toJceData(): ImMsgBody.Text { - val text = this.toString() + val text = this.display return ImMsgBody.Text( str = text, attr6Buf = buildPacket { @@ -34,12 +35,12 @@ internal fun At.toJceData(): ImMsgBody.Text { internal val atAllData = ImMsgBody.Elem( text = ImMsgBody.Text( - str = "@全体成员", + str = AtAll.display, attr6Buf = buildPacket { // MessageForText$AtTroopMemberInfo writeShort(1) // const writeShort(0) // startPos - writeShort("@全体成员".length.toShort()) // textLen + writeShort(AtAll.display.length.toShort()) // textLen writeByte(1) // flag, may=1 writeInt(0) // uin writeShort(0) // const