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

sendMediaGroup method is not working properly #492

Closed
wwwaiser opened this issue Jan 13, 2018 · 2 comments
Closed

sendMediaGroup method is not working properly #492

wwwaiser opened this issue Jan 13, 2018 · 2 comments

Comments

@wwwaiser
Copy link

wwwaiser commented Jan 13, 2018

Bug Report

I have read:

I am using the latest version of the library.

Expected Behavior

I am trying to send media group (2-10 photos).
Important: Using only file_id as media parameter (all files/file_ids already exists at telegram side).
Expecting for success.

Actual Behavior

Error: EPARSE: Error parsing response: <head><title>504 Gateway Time-out</title></head> ...
`

Steps to reproduce the Behavior

bot.sendMediaGroup(msg.chat.id, [{ type: 'photo', media: FILE_ID_1 }, { type: 'photo', media: FILE_ID_2 }]);

after quick source review of sendMediaGroup method for my specific case I found empty formData object at request options. And it is a problem. We should not define formData option if we are not going to upload anything, because for some reason it is not working.

@magic-akari
Copy link

I met the same problem when I send file from url.

related code:

bot.sendMediaGroup(chat_id, [
  {
    type: "photo",
    media:
      "https://konachan.com/sample/1272a96e6c4cbeb3fcd0acc298875e3f/Konachan.com%20-%20259979%20sample.jpg"
  },
  {
    type: "photo",
    media:
      "https://konachan.com/sample/f725edd137a3e07e16cf659541f31013/Konachan.com%20-%20259961%20sample.jpg"
  }
]);

@Exlord
Copy link

Exlord commented Feb 8, 2018

I think This is a telegram bot api bug, I got the same error with my own library. The file captions are not working either.

Urls are working fine with my lib, so its a bug here.
Have you tried mediaGroup with videos from bot? It seems to be sending the videos as normal files.
This part of the TelegramBotApi seems to be very bugi ...

eioo added a commit to eioo/DefinitelyTyped that referenced this issue May 27, 2018
eioo added a commit to eioo/DefinitelyTyped that referenced this issue May 27, 2018
eioo added a commit to eioo/DefinitelyTyped that referenced this issue May 27, 2018
mhegazy pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this issue May 29, 2018
* Added sendMediaGroup

[sendMediaGroup](https://github.com/yagop/node-telegram-bot-api/blob/435f06319e92f12fb7ef642f91d031dafe5aff80/src/telegram.js#L1831-L1877) doesn't seem to [work](yagop/node-telegram-bot-api#492) currently but here are the typings for it.

* Typo in github domain

* Removed whitespace and added semicolon
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

4 participants