This commit is contained in:
shoopea 2019-06-08 23:46:52 +08:00
parent 8facf6ec85
commit 55767c46e7
3 changed files with 3 additions and 3 deletions

2
def.go
View File

@ -9,7 +9,7 @@ import (
)
type DataBackup struct {
Messages []ChatWarsMessage `json:"messages"`
Messages []*ChatWarsMessage `json:"messages"`
}
type MQKeepAlive struct {

2
msg.go
View File

@ -280,7 +280,7 @@ func zipMessages() ([]byte, error) {
m, err := getMsg(id)
logOnError(err, "zipMessages : getMsg")
if err == nil {
append(bkp.Messages, *m)
append(bkp.Messages, m)
}
}
b, err := json.Marshal(bkp)

View File

@ -189,7 +189,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
ObjID64: m.ObjID64,
}
b, _ := json.Marshal(&p)
_, err = createJob(objSubTypeJobMsgRefresh, objJobPriority, m.UserID64, cwm.End.Add(15*time.Second).After(time.Now()), b)
_, err = createJob(objSubTypeJobMsgRefresh, objJobPriority, m.UserID64, cwm.End.Add(15*time.Second), b)
}
case objSubTypeMessageTimeAck:
_, err := fromChatWarsDate(r.ReplaceAllString(m.Text, "${Day}") + " " + r.ReplaceAllString(m.Text, "${Month}") + " " + r.ReplaceAllString(m.Text, "${Year}") + " " + r.ReplaceAllString(m.Text, "${Hour}") + ":" + r.ReplaceAllString(m.Text, "${Minute}"))