windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
256 stars 117 forks source link

answerCallbackQuery without alert #339

Closed YuriiMaiboroda closed 9 months ago

YuriiMaiboroda commented 9 months ago

In documentation of Telegram, it is written that if you call answerCallbackQuery with empty text, then Telegram will not show any alert to the user. This can be used so that Telegram stops highlighting the inline keyboard button when you need to respond not with an alert, but with a new message.

But now, if I specify empty content, the message is not sent, instead, a warning is written in the log: "msg.payload.content is empty".

I believe that answerCallbackQuery does not need to check for empty content.

windkh commented 9 months ago

Thanks for reporting. I will check this.

windkh commented 9 months ago

@YuriiMaiboroda can you try it out in the next version?

YuriiMaiboroda commented 9 months ago

The node page in node-red is still the previous version. Do you know how often the data is updated there?

YuriiMaiboroda commented 9 months ago

Updated manually via npm. Now it works. It works both in the case when the content is an empty string, and in the case when the content is removed

Thank you.