From ddebc5a9e3f4d9f6ee58d6372dc0dd835d4e02c9 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:08:19 +0800 Subject: [PATCH] fix: send time update. (#387) * fix: trigger function change. Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: online status. Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: online status change. Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: send time update. Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> --------- Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> --- internal/conversation_msg/sdk.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/conversation_msg/sdk.go b/internal/conversation_msg/sdk.go index bf644b60e..9772ad37c 100644 --- a/internal/conversation_msg/sdk.go +++ b/internal/conversation_msg/sdk.go @@ -783,6 +783,7 @@ func (c *Conversation) sendMessageToServer(ctx context.Context, s *sdk_struct.Ms wsMsgData.AttachedInfo = utils.StructToJsonString(s.AttachedInfoElem) wsMsgData.Content = []byte(s.Content) wsMsgData.CreateTime = s.CreateTime + wsMsgData.SendTime = 0 wsMsgData.Options = options if wsMsgData.ContentType == constant.AtText { wsMsgData.AtUserIDList = s.AtTextElem.AtUserList @@ -1078,6 +1079,7 @@ func (c *Conversation) SetMessageLocalEx(ctx context.Context, conversationID str func (c *Conversation) initBasicInfo(ctx context.Context, message *sdk_struct.MsgStruct, msgFrom, contentType int32) error { message.CreateTime = utils.GetCurrentTimestampByMill() + message.SendTime = message.CreateTime message.IsRead = false message.Status = constant.MsgStatusSending message.SendID = c.loginUserID