Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the text content of historical messages #43

Open
chenyu1990 opened this issue Aug 24, 2020 · 2 comments
Open

How to get the text content of historical messages #43

chenyu1990 opened this issue Aug 24, 2020 · 2 comments

Comments

@chenyu1990
Copy link

How to get the text content of historical messages

@chenyu1990
Copy link
Author

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
}

@chenyu1990
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant