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
[NO BUG] some restricted chat members have zero 'until_date' and restricted status after finishing account limitation time #1803
Comments
@ehsanonline Hi. This doesn't sound like something we could do something about... All PTB can do is get the result of |
@Bibo-Joshi Thanks. So it's a telegram bug? |
Well, if the issue is not with PTB and all PTB does is leverage the Telegram Bot API, then yes, the issue must be with Telegram. I double checked with two findings:
Are you sure that you didn't restrict for less than 30 seconds/more than 366 days? (see the docs) Closing, since the reported bug is no bug. |
Yes, I'm sure that they were restricted for limited time, not infinite. |
Okay. Maybe contact @botsupport about it. |
I think I figure it out. the problem was when i need to release a member from restriction, i used the duration=0
bot.restrictChatMember(chat_id=chatid,user_id=userid,
until_date=time.time()+duration,
permissions = ChatPermissions(
can_send_messages = True,
can_send_media_messages = True,
can_send_other_messages = True,
can_add_web_page_previews = True,
)
) It was working fine, but after the api and PTB updates, they have add new args to the also i think it's better to set the default value of them to True. because a user is not restricted by default, unless he/she become one by an admin. |
Steps to reproduce
limit a member from sending all types of messages using
restrictChatMember
for a short/long (not infinite) duration.let the time pass. after that the user can send messages but the
getChatMember
says that user is still limited but with zero duration.like this:
it will stays like this FOREVER. even when i used the
restrictChatMember
again to release the member (after passed limitation duration).the only way to change the status to
member
is to make the user admin then member again ( i didn't use bot for doing that).Expected behaviour
getChatMember
return this after passing the limitation time (like earlier versions):Actual behaviour
the member status stays 'restricted', with 0 until_date. but the member can send messages.
Configuration
ubuntu 16.04 server
Version of Python, python-telegram-bot & dependencies:
Logs
no logs
i'm not sure if this is just my group problem (never happened before) or the users problem (happened for two of them at least, one of them deleted her/his account but that doesn't help) or the telegram problem (after last update this problem started) or the library problem (always using latest). or just my code.
anyone else experiencing this problem?
The text was updated successfully, but these errors were encountered: