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