()
| 48 | # Process webhook calls |
| 49 | @app.route(WEBHOOK_URL_PATH, methods=['POST']) |
| 50 | def webhook(): |
| 51 | if flask.request.headers.get('content-type') == 'application/json': |
| 52 | json_string = flask.request.get_data().decode('utf-8') |
| 53 | update = telebot.types.Update.de_json(json_string) |
| 54 | bot.process_new_updates([update]) |
| 55 | return '' |
| 56 | else: |
| 57 | flask.abort(403) |
| 58 | |
| 59 | |
| 60 | # Handle '/start' and '/help' |
nothing calls this directly
no test coverage detected
searching dependent graphs…