From 457898d37bc706356eb75ee5f1bc25076049d034 Mon Sep 17 00:00:00 2001 From: sam01101 Date: Thu, 15 Apr 2021 12:42:47 +0800 Subject: [PATCH] Fixes #839 --- coolq/event.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coolq/event.go b/coolq/event.go index 9e605e871..81423d599 100644 --- a/coolq/event.go +++ b/coolq/event.go @@ -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,