Update message.go

cosmetic
This commit is contained in:
suntong 2021-08-01 10:19:53 -04:00 committed by GitHub
parent 0a96046305
commit e91403d74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,13 +346,11 @@ func (m *Message) init(bot *Bot) {
if regexp.MustCompile(`^<`).MatchString(m.Content) {
m.Content = html.UnescapeString(m.Content)
}
//if m.IsText()
{
m.Content = strings.Replace(m.Content, `<br/>`, "\n", -1)
}
// 格式化文本消息中的emoji表情
// 文本消息
if m.IsText() {
m.Content = strings.Replace(m.Content, `<br/>`, "\n", -1)
// 格式化文本消息中的emoji表情
m.Content = FormatEmoji(m.Content)
}
}