Errors on deleteMessage thrown when user is not set
paluki opened this issue · 2 comments
Describe the bug
When deleteMessage is called and the "user" attribute is not set there is an error thrown for every authenticated user and a success for the one specified in chat_id.
"Failed sending [chatId - xxxxxxxxxx]: Error: ETELEGRAM: 400 Bad Request: message to delete not found"
Where chatId which is shown in the error is always the Id of the last authenticated user.
This is especially bad when you're deleting messages from groups because the user attribute doesn't accept groupIds and i did not find an alternative in the documentation.
To Reproduce
Call deleteMessage with a valid chat_id and message_id but with no user set. / Set user to a groupId or name
Expected behavior
No errors thrown on empty user or a way to set user or another attribute to a groupId.
Versions:
- Adapter version: 3.1.0 + 3.2.1
- JS-Controller version: 4.0.23 + 5.0.19
- Node version: 18.20.1
- Operating system: Raspbian 10 buster