Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the bot sends a message, it does not get the message object as a return #19

Closed
jgsmarques opened this issue Jun 4, 2019 · 0 comments

Comments

@jgsmarques
Copy link

Hi,

I'm doing a test where the user sends a message to the bot, the bot responds, and needs to keep hold of the message_id that is in the response object. However, I've seen that during the tests the bot is not able to receive this message_id. I tracked it to the routes/bot/sendMessage.js file in the following code:

const sendMessage = (app, telegramServer)=> {
  handle(app, '/bot:token/sendMessage', (req, res, unusedNext) => {
    const botToken = req.params.token;
    telegramServer.addBotMessage(req.body, botToken);
    const data = {ok: true, result: null};
    res.sendResult(data);
  });
};

Here I see that the bot receives a data object, but it probably does not match the object it gets from Telegram.

@jehy jehy closed this as completed in a9a39a1 Nov 28, 2021
jehy added a commit that referenced this issue Nov 28, 2021
reply with message on /sendMessage (fix #19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants