TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.23k stars 693 forks source link

I receive unexpected entities #1438

Closed LeeeJoe closed 2 hours ago

LeeeJoe commented 3 hours ago

I found a bug to report

When I send large text messages (1500 characters or more) I get unexpected entities in the entity values ​​that are attached to the message. Please check this situation. Thank you.

Code is very simple:

            return await bot.SendMessage(
                chatId: message.Chat.Id,
                text: text,
                replyParameters: null,
                replyMarkup: null);

NuGet Package Version: 22.0.2 .NET Version: 9.0 IDE: VS2022 App: Desktop

wiz0u commented 2 hours ago

Please send such large message to @JsonDumpBot and post the result here, and explain what's wrong. Alternatively if you don't want to make it public, you can send me the result in private @wiz0u

LeeeJoe commented 2 hours ago

Solved

wiz0u commented 2 hours ago

as discussed, what you witness was Telegram automatically creating URL entities when your message text contains some URL links