Skip to content

bot: use Recipient instead of Chat in Leave and Unpin methods #568

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

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

opmega
Copy link
Contributor

@opmega opmega commented Nov 12, 2022

These methods used Chat when they only call the Recipient() from the Recipient interface.

@opmega
Copy link
Contributor Author

opmega commented Nov 12, 2022

Having Recipient as parameter allows usage of telebot.ChatID(id)

@opmega opmega changed the title Use recipient instead of Chat Use Recipient instead of *Chat Nov 12, 2022
@demget
Copy link
Collaborator

demget commented Nov 12, 2022

Yeah, the thing is we don't want to expect Sender to be used in these calls. But the ChatID argument will be a more useful case anyway, and passing a proper chat recipient will be up to the user then. So I think we'll merge it.

@demget demget added this to the v3.2 milestone Nov 12, 2022
@demget demget changed the title Use Recipient instead of *Chat bot: use Recipient instead of Chat in Leave and Unpin methods Nov 18, 2023
@demget demget modified the milestones: v3.2, v3.3 Nov 19, 2023
@demget
Copy link
Collaborator

demget commented Feb 20, 2024

Are there other methods we need to change for consistency?

@opmega
Copy link
Contributor Author

opmega commented Feb 21, 2024

When I did this change these 3 methods were the only ones I found but it has been a while. If necessary I could go ahead and verify.

@demget demget changed the base branch from v3 to v3.3 March 3, 2024 14:40
@demget demget merged commit e4f891b into tucnak:v3.3 Mar 3, 2024
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

Successfully merging this pull request may close these issues.

2 participants