From 153c1b079aef5f71d71418626dc92ed85305e08f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?=
<10476982+li-xunhuan@users.noreply.github.com>
Date: Mon, 2 Aug 2021 13:46:56 +0800
Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E5=A4=84=E7=90=86?=
=?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=AD=E7=9A=84emoji=E5=92=8C=E6=8D=A2?=
=?UTF-8?q?=E8=A1=8C=E7=AC=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
message.go | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/message.go b/message.go
index 76c4b2c..aec1fa6 100644
--- a/message.go
+++ b/message.go
@@ -347,12 +347,10 @@ func (m *Message) init(bot *Bot) {
m.Content = html.UnescapeString(m.Content)
}
- // 文本消息
- if m.IsText() {
- m.Content = strings.Replace(m.Content, `
`, "\n", -1)
- // 格式化文本消息中的emoji表情
- m.Content = FormatEmoji(m.Content)
- }
+ // 处理消息中的换行
+ m.Content = strings.Replace(m.Content, `
`, "\n", -1)
+ // 处理消息中的emoji表情
+ m.Content = FormatEmoji(m.Content)
}
// SendMessage 发送消息的结构体