From e6166319e85cf8a38edc3ad2ece682e122a919b2 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Sun, 16 Apr 2023 18:57:31 +0300 Subject: [PATCH] fix-update --- .gitignore | 3 ++- api/index.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2763391..04b2945 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ __pycache__ .DS_Store .vercel -api/payload.json \ No newline at end of file +api/payload.json +update.json \ No newline at end of file diff --git a/api/index.py b/api/index.py index fb766c8..3f1bc24 100644 --- a/api/index.py +++ b/api/index.py @@ -29,7 +29,7 @@ async def handle(req): try: update = req.json print(update) - msg = update.get('message') + msg = update.get('message', update.get('my_chat_member')) if msg['chat']['id'] == CHAT_ID: chat_id = msg['chat']['id'] member_id = msg['user']['id']