Skip to content

TelegramBotHandler: API returns error when long message is split with only whitespace #1991

@MacDada

Description

@MacDada

Monolog 3.9.

When I split long messages and the split happens exactly at the ending part of the message, which happens to contain only whitespace, Telegram API returns error 400:

Bad Request: text must be non-empty

That's because the last (from split) message is just "\n\n".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions