windkh / node-red-contrib-telegrambot

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

"poll_answer" is throwing "Unauthorized incoming call from undefined" when ChatIds restriction is active #314

Closed Xilef12000 closed 1 year ago

Xilef12000 commented 1 year ago

When using the poll_answer mode of the event node, and having a restriction for the bot usage, by utilizing either the "User" or "ChatIds" option in the bot config, the poll_answer node only throws "Unauthorized incoming call from undefined", when i vote in a poll. (Note: "Verbose Logging" in the bot config is enabled)

Using the poll_answer node without any restrictions to users or chatIDs works as expected, but when adding "Users" or "ChatIds" the poll_answer mode of the event node stops working. (While the receiver node still works.) When now enabling "Verbose Logging" the following error-message is thrown: "Unauthorized incoming call from undefined" when voting.

This issue might link to #2 Unauthorized incoming call from undefined and/or #80 Inline keyboard callback and auth by chat id.

windkh commented 1 year ago

How can i reproduce it? With the poll example?

Xilef12000 commented 1 year ago

Yes, the same issue appears with the createpoll.json example.

My steps to reproduce the issue:

  1. imported createpoll.json
  2. created brand new bot
  3. inserted Token into Properties
  4. testing:
    1. text /newpoll1 to bot
    2. bot logs message in debug
    3. bot creates poll
    4. vote in poll
    5. bot logs your vote in debug
  5. added chatID into "ChatIds" in Properties
  6. testing:
    1. text /newpoll1 to bot
    2. bot logs message in debug
    3. bot creates poll
    4. vote in poll
    5. bot doesn't register vote in debug
  7. enabled "Verbose Logging" in Properties
  8. testing:
    1. text /newpoll1 to bot
    2. bot logs message in debug
    3. bot creates poll
    4. vote in poll
    5. getting "Unauthorized incoming call from undefined" in debug
windkh commented 1 year ago

Thanks for reporting I will check this out

windkh commented 1 year ago

should be fixed in 5.1.2