mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
fixed broken messages queing up
This commit is contained in:
@@ -35,6 +35,7 @@ def remove_bot(request, pk):
|
||||
|
||||
@csrf_exempt
|
||||
def hook(request, token):
|
||||
try:
|
||||
tb = get_object_or_404(TelegramBot, webhook_token=token)
|
||||
|
||||
data = json.loads(request.body.decode())
|
||||
@@ -57,5 +58,7 @@ def hook(request, token):
|
||||
)
|
||||
)
|
||||
return JsonResponse({'data': data['message']['text']})
|
||||
except:
|
||||
pass
|
||||
|
||||
return JsonResponse({})
|
||||
|
||||
Reference in New Issue
Block a user