This commit is contained in:
shoopea 2019-06-08 23:52:41 +08:00
parent 55767c46e7
commit 0ad9596840

4
msg.go
View File

@ -275,14 +275,16 @@ func parseSubTypeMessagePillageInc(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
func zipMessages() ([]byte, error) {
bkp := DataBackup{}
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(bkp.Messages, m)
append(msgs, m)
}
}
bkp.Messages = msgs
b, err := json.Marshal(bkp)
logOnError(err, "exportMessages : Marshal")
if err != nil {