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

Fix for complex-formatted Telegram text #1765

Merged
merged 5 commits into from
Mar 19, 2022
Merged

Fix for complex-formatted Telegram text #1765

merged 5 commits into from
Mar 19, 2022

Conversation

ValdikSS
Copy link
Contributor

@ValdikSS ValdikSS commented Mar 16, 2022

This patchset fixes issue #909.

Long messages (posts forwarded to bridged chat from telegram channel) with multiple URLs gets corrupted: the URLs are misplaced and appear in the middle of the text, rewriting original text in this place.

@ValdikSS
Copy link
Contributor Author

Tested with Latin, Russian and Chinese, so I guess no need to explicitly encode as utf16.

@ValdikSS
Copy link
Contributor Author

Turned out that Unicode emojis break the markup, fixed by processing everything in utf16.

@42wim
Copy link
Owner

42wim commented Mar 17, 2022

@ValdikSS thanks a lot for looking into this!
could you just run a gofmt -s on handlers.go so the linter is happy and I can merge it

@42wim 42wim added this to the 1.24.1 milestone Mar 17, 2022
@42wim 42wim added the telegram label Mar 17, 2022
@ValdikSS
Copy link
Contributor Author

@ValdikSS thanks a lot for looking into this! could you just run a gofmt -s on handlers.go so the linter is happy and I can merge it

Done, please check.

@codeclimate
Copy link

codeclimate bot commented Mar 18, 2022

Code Climate has analyzed commit 3c853e2 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 5

View more on Code Climate.

@42wim 42wim merged commit c51753c into 42wim:master Mar 19, 2022
@42wim
Copy link
Owner

42wim commented Mar 19, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants