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 send the user profile photo in a message? #3172

Closed
skygate2012 opened this issue Dec 7, 2024 · 3 comments
Closed

How to send the user profile photo in a message? #3172

skygate2012 opened this issue Dec 7, 2024 · 3 comments

Comments

@skygate2012
Copy link

I tried to pass user.profile_photo.small.remote.id as the inputFileRemote.id and it says Can't use file of type ChatPhoto as Photo.

@levlam
Copy link
Contributor

levlam commented Dec 7, 2024

That's correct. You must use an identifier from Photo object. You can find one in userFullInfo.

@skygate2012
Copy link
Author

I looked at the userFullInfo class but there are also all ChatPhoto objects?

@skygate2012
Copy link
Author

skygate2012 commented Dec 7, 2024

Thanks I figured it out :) It's userFullInfo.photo.sizes[0].photo.remote.id

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

2 participants