This commit is contained in:
苏尹岚
2020-12-25 11:38:33 +08:00
parent 598e78bba7
commit 6a41d536fa

View File

@@ -184,6 +184,9 @@ func handleMessages() {
msg.UserInfo = user
}
globals.SugarLogger.Debugf("msg %v", utils.Format4Output(msg, false))
if msg.CreatedAt == utils.ZeroTimeValue {
msg.CreatedAt = time.Now()
}
err = client.WriteJSON(msg)
if err != nil {
globals.SugarLogger.Debugf("client.WriteJSON error: %v", err)