Closed jazarja closed 4 years ago
You need to add if req.body.message || req.body.callback_query
in telegram.coffee to support webhook
Like this:
if @webhook
endpoint = @webhook + '/' + @token
@robot.logger.debug 'Listening on ' + endpoint
@api.invoke 'setWebHook', {url: endpoint}, (err, result) ->
if (err)
self.emit 'error', err
@robot.router.post "/" + @token, (req, res) =>
console.log(req.body)
if req.body.message || req.body.callback_query
self.handleUpdate req.body
res.send 'OK'
@jazarja @wgcv Hi guys, sorry for the super late reply but... during the quarantine I rewrote the adapter completely in typescript. It should also address this case... do you mind to check the other PR #72 ? Thx
How do you get the callback from hubot? robot.answerCallbackQuery ?The data of the CallbackQuery is the message so you can make something like