windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
269 stars 119 forks source link

answerCallbackQuery without alert #339

Closed YuriiMaiboroda closed 1 year ago

YuriiMaiboroda commented 1 year 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 1 year ago

Thanks for reporting. I will check this.

windkh commented 1 year ago

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

YuriiMaiboroda commented 1 year ago

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

YuriiMaiboroda commented 1 year 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.