This commit is contained in:
shoopea 2019-05-03 17:22:17 +08:00
parent 0872e48380
commit 0ba3dac47c
2 changed files with 2 additions and 6 deletions

View File

@ -1,7 +1,6 @@
package main package main
import ( import (
"encoding/json"
"flag" "flag"
"fmt" "fmt"
"log" "log"
@ -10,7 +9,6 @@ import (
"gopkg.in/gcfg.v1" "gopkg.in/gcfg.v1"
"github.com/Arman92/go-tdlib" "github.com/Arman92/go-tdlib"
"github.com/streadway/amqp"
) )
type MsgDirection string type MsgDirection string

6
td.go
View File

@ -2,13 +2,11 @@ package main
import ( import (
"encoding/json" "encoding/json"
"flag"
"fmt" "fmt"
"log" "log"
"math"
"time" "time"
"gopkg.in/gcfg.v1"
"github.com/Arman92/go-tdlib" "github.com/Arman92/go-tdlib"
"github.com/streadway/amqp" "github.com/streadway/amqp"
) )
@ -142,7 +140,7 @@ func getHistory(c *tdlib.Client) {
logOnError(err, "Cannot get history") logOnError(err, "Cannot get history")
lastMsgID64 = -1 lastMsgID64 = -1
} else { } else {
for msg := range msgs.Messages { for _, msg := range msgs.Messages {
m := ChatWarsMessage{ m := ChatWarsMessage{
UserID64: int64(msg.SenderUserID), UserID64: int64(msg.SenderUserID),