diff --git a/mirai-core/src/commonMain/kotlin/contact/announcement/AnnouncementsImpl.kt b/mirai-core/src/commonMain/kotlin/contact/announcement/AnnouncementsImpl.kt index 5b87fea88..323f9817a 100644 --- a/mirai-core/src/commonMain/kotlin/contact/announcement/AnnouncementsImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/announcement/AnnouncementsImpl.kt @@ -296,7 +296,7 @@ internal object AnnouncementProtocol { fun Announcement.toGroupAnnouncement(senderId: Long): GroupAnnouncement { return GroupAnnouncement( sender = senderId, - msg = GroupAnnouncementMsg(text = content), + msg = GroupAnnouncementMsg(text = content), // 实际测试中发布一个新公告的时候不需要进行 html 转码 type = if (parameters.sendToNewMember) 20 else 6, settings = GroupAnnouncementSettings( isShowEditCard = if (parameters.showEditCard) 1 else 0, @@ -314,7 +314,7 @@ internal object AnnouncementProtocol { group = group, senderId = sender, sender = group[sender], - content = msg.text, + content = msg.text.decodeHtmlEscape(), parameters = buildAnnouncementParameters { isPinned = this@toAnnouncement.pinned == 1 sendToNewMember = type == 20