Skip to content

Commit

Permalink
Merge pull request #840 from sam01101/patch-1
Browse files Browse the repository at this point in the history
Fixes #839
  • Loading branch information
Mrs4s authored May 26, 2021
2 parents d4613cf + 457898d commit a526ec6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion coolq/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ func (bot *CQBot) privateMessageEvent(c *client.QQClient, m *message.PrivateMess
}
log.Infof("收到好友 %v(%v) 的消息: %v (%v)", m.Sender.DisplayName(), m.Sender.Uin, cqm, id)
fm := MSG{
"post_type": "message",
"post_type": func() string {
if m.Sender.Uin == bot.Client.Uin {
return "message_sent"
}
return "message"
}(),
"message_type": "private",
"sub_type": "friend",
"message_id": id,
Expand Down

0 comments on commit a526ec6

Please sign in to comment.