php - Telegram sends duplicate POST JSON requests to webhook -
i trying develop city bot telegram, meet problem. after sending message bot, telegram sends 2 duplicate requests webhook url. webhook script works twice , sends twice responses user. script - hellobot.php official telegram docs. server vps hosting self-signed ssl, uploaded cert key telegram.
from server logs.
149.154.167.209 - - [28/jun/2016:13:48:00 +0300] "post /apps/gate.php http/1.0" 200 86 "-" "- 149.154.167.209 - - [28/jun/2016:13:48:00 +0300] "post /apps/gate.php http/1.1" 200 86 "-" "- 149.154.167.209 - - [28/jun/2016:13:48:00 +0300] "post /apps/gate.php http/1.0" 200 86 "-" "- 149.154.167.209 - - [28/jun/2016:13:48:00 +0300] "post /apps/gate.php http/1.1" 200 86 "-" "-
how fix this?
could post code;
if asking getupdates
, send response user upon each result
; may send duplication because did not set offset right
offset (description): identifier of first update returned. must greater 1 highest among identifiers of received updates. default, updates starting earliest unconfirmed update returned. update considered confirmed getupdates called offset higher update_id. ...
Comments
Post a Comment