1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1911 from Badiboy/master

restrict_chat_member fix
This commit is contained in:
Badiboy 2023-02-09 17:58:28 +03:00 committed by GitHub
commit a999161384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -974,7 +974,7 @@ def restrict_chat_member(
payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()} payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()}
if use_independent_chat_permissions is not None: if use_independent_chat_permissions is not None:
permissions['use_independent_chat_permissions'] = use_independent_chat_permissions payload['use_independent_chat_permissions'] = use_independent_chat_permissions
if until_date is not None: if until_date is not None:
if isinstance(until_date, datetime): if isinstance(until_date, datetime):
payload['until_date'] = until_date.timestamp() payload['until_date'] = until_date.timestamp()

View File

@ -966,7 +966,7 @@ async def restrict_chat_member(
payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()} payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()}
if use_independent_chat_permissions is not None: if use_independent_chat_permissions is not None:
permissions['use_independent_chat_permissions'] = use_independent_chat_permissions payload['use_independent_chat_permissions'] = use_independent_chat_permissions
if until_date is not None: if until_date is not None:
if isinstance(until_date, datetime): if isinstance(until_date, datetime):
payload['until_date'] = until_date.timestamp() payload['until_date'] = until_date.timestamp()