Skip to content

Commit

Permalink
fix: send time update. (#387)
Browse files Browse the repository at this point in the history
* fix: trigger function change.

Signed-off-by: Gordon <[email protected]>

* fix: online status.

Signed-off-by: Gordon <[email protected]>

* fix: online status change.

Signed-off-by: Gordon <[email protected]>

* fix: send time update.

Signed-off-by: Gordon <[email protected]>

---------

Signed-off-by: Gordon <[email protected]>
  • Loading branch information
FGadvancer authored Oct 26, 2023
1 parent 304b6c8 commit ddebc5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/conversation_msg/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ddebc5a

Please sign in to comment.