Skip to content

[NO BUG] some restricted chat members have zero 'until_date' and restricted status after finishing account limitation time #1803

@ehsanonline

Description

@ehsanonline

Steps to reproduce

  1. limit a member from sending all types of messages using restrictChatMember for a short/long (not infinite) duration.

  2. 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:

{'user': {'id': 123, 'first_name': 'USER', 'is_bot': False, 'language_code': 'fa'}, 
'status': 'restricted', 'until_date': 0, 
'is_member': True}

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):

{'user': {'id': 123, 'first_name': 'USER', 'is_bot': False, 'language_code': 'fa'}, 'status': 'member', 'until_date': None}

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:

python-telegram-bot 12.4.2
certifi 2018.08.24
future 0.16.0
Python 3.6.8 (default, Dec 24 2018, 19:24:27)  [GCC 5.4.0 20160609]

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⚙️ bot-apiaffected functionality: bot-api

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions