fix:sent message already has a timestamp, no timestamp will be generated

pull/982/head
pluto 2 years ago
parent 5b478e3d63
commit 23a43ef0b9

@ -128,7 +128,9 @@ func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgRe
func (m *msgServer) encapsulateMsgData(msg *sdkws.MsgData) { func (m *msgServer) encapsulateMsgData(msg *sdkws.MsgData) {
msg.ServerMsgID = GetMsgID(msg.SendID) msg.ServerMsgID = GetMsgID(msg.SendID)
if msg.SendTime == 0 {
msg.SendTime = utils.GetCurrentTimestampByMill() msg.SendTime = utils.GetCurrentTimestampByMill()
}
switch msg.ContentType { switch msg.ContentType {
case constant.Text: case constant.Text:
fallthrough fallthrough

Loading…
Cancel
Save