This commit is contained in:
shoopea 2019-06-08 23:59:34 +08:00
parent 7b292afb4e
commit d1dfaa54ea
2 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 {

4
msg.go
View File

@ -275,13 +275,13 @@ func parseSubTypeMessagePillageInc(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
func zipMessages() ([]byte, error) {
bkp := DataBackup{}
msgs := new([]*ChatWarsMessage)
msgs := new([]ChatWarsMessage)
ids := getSQLListID64(`SELECT om.obj_id id FROM obj_msg om;`)
for _, id := range ids {
m, err := getMsg(id)
logOnError(err, "zipMessages : getMsg")
if err == nil {
append(*msgs, m)
append(*msgs, *m)
}
}
bkp.Messages = *msgs