This commit is contained in:
shoopea 2019-05-04 18:03:25 +08:00
parent 0d95954583
commit 1d114e6992

3
td.go
View File

@ -72,6 +72,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
var msgCount int32 = 0 var msgCount int32 = 0
var lastMsgTime time.Time = time.Now() var lastMsgTime time.Time = time.Now()
var chat int64 var chat int64
var m ChatWarsMessage
if *chatID64 == 0 { if *chatID64 == 0 {
chat = user_chtwrsbot chat = user_chtwrsbot
@ -94,7 +95,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
switch msg.Content.GetMessageContentEnum() { switch msg.Content.GetMessageContentEnum() {
case tdlib.MessageTextType: case tdlib.MessageTextType:
if msg.ForwardInfo == nil { if msg.ForwardInfo == nil {
m := ChatWarsMessage{ m = ChatWarsMessage{
SenderUserID64: int64(msg.SenderUserID), SenderUserID64: int64(msg.SenderUserID),
Date: msg.Date, Date: msg.Date,
ID64: msg.ID, ID64: msg.ID,