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

Formattings are truncated #20

Open
LinqLover opened this issue Mar 28, 2021 · 1 comment
Open

Formattings are truncated #20

LinqLover opened this issue Mar 28, 2021 · 1 comment
Labels
bug Something isn't working upstream

Comments

@LinqLover
Copy link
Owner

Example to reproduce:

text := Text streamContents: [:stream |
  1 to: 200 do: [:i |
    stream withAttributes: {i even ifTrue: [TextEmphasis bold] ifFalse: [TextEmphasis italic]} do: [
      stream nextPut: $x]]].
bot sendText: text toChat: chatId.

Expected result: A message is sent where all characters are formatted in bold and italic in an alternating manner.

Actual result: The message is sent, but only the first part is formatted correctly:

image

@LinqLover
Copy link
Owner Author

I could reproduce the same bug using the Bot API for python or even some Telegram clients, so I have reported the bug to https://t.me/Support:

Bug Report
I found a small bug when sending messages that contain large amounts of formatted text. Only the first part of all formatting will be applied. Because I can reproduce it using multiple clients (Telegram Web/Android) as well as the Bot API, I think it's an issue in the back end.

Here is how to reproduce it: Send the following message with Markdown markup to any chat: **a**a , but repeat it 200 times in the same message (i.e., in Python you could evaluate: '**a**a ' * 200. Alternatively, send '<b>b</b><u>u</u>' * 100 using the Bot API with HTML markup (tested with the API implementations for Python and Smalltalk).

The expected behavior would be that the entire message is formatted following the same pattern. However, only the first part of the message is formatted correctly. It appears that the formatting tags are truncated somewhere. This limitation should be either fixed or at least be documented in the APIs, including the Bot API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

1 participant