go-tdlib
go-tdlib copied to clipboard
How to get the text content of historical messages
How to get the text content of historical messages
history, err := client.GetChatHistory(cfg.AdChatID, 0, 0, 1, true)
if err != nil {
return nil
}
for _, message := range history.Messages {
contact := message.Content.(*tdlib.MessageContact)
// contact is nil
}
If you do not parse the text message, it is better to return to Raw. I can only get the text message by modifying GetChatHistory to return to Raw