telebot icon indicating copy to clipboard operation
telebot copied to clipboard

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

Open opmega opened this issue 2 years ago • 2 comments

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

opmega avatar Nov 12 '22 14:11 opmega

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

opmega avatar Nov 12 '22 14:11 opmega

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 avatar Nov 12 '22 14:11 demget

Are there other methods we need to change for consistency?

demget avatar Feb 20 '24 21:02 demget

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.

opmega avatar Feb 21 '24 15:02 opmega