name
This commit is contained in:
parent
41f3fc9001
commit
34a3c1b29a
6
main.go
6
main.go
@ -103,7 +103,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64) {
|
||||
|
||||
bkp := DataBackup{}
|
||||
s := new([]ChatWarsMessage)
|
||||
msgs := *s
|
||||
bkpmsgs := *s
|
||||
|
||||
for lastParsedID64 >= 0 {
|
||||
prevLastParsedID64 := lastParsedID64
|
||||
@ -151,7 +151,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64) {
|
||||
}
|
||||
|
||||
if m.ID64 != 0 {
|
||||
msgs = append(msgs, m)
|
||||
bkpmsgs = append(bkpmsgs, m)
|
||||
msgCount = msgCount + 1
|
||||
}
|
||||
default:
|
||||
@ -186,7 +186,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64) {
|
||||
log.Printf("Exported %d messages.\n", msgCount)
|
||||
fmt.Printf("Exported %d messages.\n", msgCount)
|
||||
|
||||
bkp.Messages = msgs
|
||||
bkp.Messages = bkpmsgs
|
||||
b, err := json.Marshal(bkp)
|
||||
logOnError(err, "getHistory : Marshal")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user