test
This commit is contained in:
parent
046d47bc52
commit
71ee2eb14b
7
td.go
7
td.go
@ -93,7 +93,6 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
lastMsgID64 = -1
|
||||
}
|
||||
} else if msgs.TotalCount > 0 {
|
||||
fmt.Printf("Exported %d messages so far.\n", msgCount)
|
||||
for _, msg := range msgs.Messages {
|
||||
switch msg.Content.GetMessageContentEnum() {
|
||||
case tdlib.MessageTextType:
|
||||
@ -105,15 +104,13 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
ChatID64: msg.ChatID,
|
||||
Text: msg.Content.(*tdlib.MessageText).Text.Text,
|
||||
}
|
||||
fmt.Printf("straight msg id : %d\n", m.ID64)
|
||||
} else {
|
||||
if msg.ForwardInfo.GetMessageForwardInfoEnum() == tdlib.MessageForwardedFromUserType {
|
||||
fmt.Printf("forwarded msg date : %d\n", msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date)
|
||||
m = ChatWarsMessage{
|
||||
SenderUserID64: int64(msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).SenderUserID),
|
||||
Date: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date,
|
||||
ID64: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).ForwardedFromMessageID,
|
||||
ChatID64: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).ForwardedFromChatID,
|
||||
ID64: msg.ID,
|
||||
ChatID64: 0,
|
||||
Text: msg.Content.(*tdlib.MessageText).Text.Text,
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user