From 0ba3dac47cac90a2fa54c3b0dbdd0eaadb2d1f58 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 3 May 2019 17:22:17 +0800 Subject: [PATCH] upd --- main.go | 2 -- td.go | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index f8af0fe..01ee1dd 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,6 @@ package main import ( - "encoding/json" "flag" "fmt" "log" @@ -10,7 +9,6 @@ import ( "gopkg.in/gcfg.v1" "github.com/Arman92/go-tdlib" - "github.com/streadway/amqp" ) type MsgDirection string diff --git a/td.go b/td.go index 9720152..08dad97 100644 --- a/td.go +++ b/td.go @@ -2,13 +2,11 @@ package main import ( "encoding/json" - "flag" "fmt" "log" + "math" "time" - "gopkg.in/gcfg.v1" - "github.com/Arman92/go-tdlib" "github.com/streadway/amqp" ) @@ -142,7 +140,7 @@ func getHistory(c *tdlib.Client) { logOnError(err, "Cannot get history") lastMsgID64 = -1 } else { - for msg := range msgs.Messages { + for _, msg := range msgs.Messages { m := ChatWarsMessage{ UserID64: int64(msg.SenderUserID),