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

Method getUserChatBoosts doesn't work correctly #1200

Closed
dsvynarenko opened this issue May 30, 2024 · 2 comments
Closed

Method getUserChatBoosts doesn't work correctly #1200

dsvynarenko opened this issue May 30, 2024 · 2 comments

Comments

@dsvynarenko
Copy link
Contributor

Bug Report

I have read:

I am using the latest version of the library.

Expected Behavior

getUserChatBoosts method works correctly and returns UserChatBoosts for a successful request.

Actual Behavior

getUserChatBoosts method always rejects with an error:

ETELEGRAM: 400 Bad Request: invalid user_id specified
    at /app/node_modules/node-telegram-bot-api/src/telegram.js:316:15
    at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
...

Steps to reproduce the Behavior

Just simply call getUserChatBoosts.

dsvynarenko pushed a commit to dsvynarenko/node-telegram-bot-api that referenced this issue May 30, 2024
dsvynarenko added a commit to dsvynarenko/node-telegram-bot-api that referenced this issue May 30, 2024
@dsvynarenko
Copy link
Contributor Author

As a workaround for this issue instead of calling:

const userBoosts = await telegramBot.getUserChatBoosts(chatId, userId);

the following call can be used:

const userBoosts = await telegramBot._request('getUserChatBoosts', {
  form: {
    chat_id: chatId,
    user_id: userId
  }
});

@danielperez9430
Copy link
Collaborator

danielperez9430 commented May 30, 2024

Okey, found the problem and pushed the fix.

Will be solve on the next release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants