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

Sending group media message fails when sending local files. #56

Closed
HeySreelal opened this issue Mar 31, 2023 · 0 comments · Fixed by #59
Closed

Sending group media message fails when sending local files. #56

HeySreelal opened this issue Mar 31, 2023 · 0 comments · Fixed by #59
Assignees
Labels
bug Something isn't working invalid This doesn't seem right test This issue needs detailed testing

Comments

@HeySreelal
Copy link
Owner

The sendMediaGroup works fine when the files are added using either the InputFile.fromUrl or InputFile.fromFileId methods.

But, when adding files with the InputFile.fromFile to send local files, the method fails.

Example code:

    final group = [
      InputMediaPhoto(
        media: InputFile.fromFile(
          io.File("./example/photo.jpeg"),
        ),
      ),
      InputMediaPhoto(
        media: InputFile.fromFile(
          io.File("./example/galaxy.jpeg"),
        ),
      ),
    ];

    final msgs = await bot.api.sendMediaGroup(id, group);

Error code:
HttpException [400]: Bad Request: there are no messages to send

@HeySreelal HeySreelal self-assigned this Mar 31, 2023
@HeySreelal HeySreelal added bug Something isn't working invalid This doesn't seem right test This issue needs detailed testing labels Mar 31, 2023
@HeySreelal HeySreelal linked a pull request Mar 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right test This issue needs detailed testing
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant