| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Co-authored-by: Wim <wim@42.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #2021
* Fix broken reply
* Fix reply/quoting logic with topics
* Update handlers.go
---------
Co-authored-by: Wim <wim@42.be>
|
|
|
|
|
|
|
|
|
|
| |
Topics are surfaced by appending /<topic-id> to the channel setting for the gateway.
An example for the topic with ID of 16 would be:
```
[[gateway.inout]]
account="telegram.mytelegram"
channel="-100xxxxxxxxxx/16"
```
|
|
|
|
|
| |
This comes in handy for annoucement type channels where neither the SenderChat or From structs contain name information.
Also Tweak username logic as when using a full name the username field can be " " instead of "".
|
| |
|
|
|
|
|
|
|
| |
* Fix message html entities escaping when sending to Telegram
* Fix error messages in telegram and slack bridges
Co-authored-by: Wim <wim@42.be>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handleEntities code uses simple modification offset which does not
allow to detect whether the offset is placed before or after
the element in already modified string.
This works fine is most cases as Telegram server always sort the
elements by offset, in ascending order.
However, this is not the case when the modification, for example bold
text, is applied to the URL. In this case, the offset of URL and
bold entity is equal, which raises the issue.
This commit introduces additional hack for this case, stripping
any entities which intersect with URL.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Send multiple images/video/documents as media group
* Fix media caption quotting
* Fix errors handling
* Refactor parent id detection
* Try to reduce cognitive complexity of code
* Remove unused conditional
|
|
|
|
|
|
|
| |
* Preserve threading from telegram replies
* Add fallback for unthreaded telegram message
* Fix linter issue
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Telegram: handle entities before everything
* Telegram: use runes for text entities
* Telegram: use proper offset and runes for links
* Telegram: put newline after backticks for pre
* Telegram: use utf16 for entity processing
|
|
|
|
| |
Forward from channels requires different handling than forward from the regular users.
This patch fixes the issue: it prints channel title instead of "forwarded from unknown".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change bridge/telegram/handlers.go
Comment out the removing of empty lines
add support for bold, italic and striked telegram messages
* Implement Telegram MessageEntities correctly
* Apply gofmt
Co-authored-by: Jan Martin Reckel <jan-martin.reckel@s2017.tu-chemnitz.de>
Co-authored-by: Wim <wim@42.be>
|
|
|
|
|
|
|
|
|
|
| |
* Add support for sender_chat (telegram)
Fixes #1654
https://core.telegram.org/bots/api#december-7-2021
* Add debuglevel option
Add `debuglevel=1` in telegram config to increase debug
|
|
|
|
|
|
|
|
| |
* feat(telegram): command to get chat id
* Gofumpt
Co-authored-by: Ivan Zuev <i-zuev@yandex-team.ru>
Co-authored-by: Wim <wim@42.be>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* handle code blocks in telegram.
* support multi-line code blocks.
* remove import.
* handle code blocks in middle of normal text.
* support multiple code blocks in same message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds support for go/cgo tgs conversion when building with the -tags `cgo`
The default binaries are still "pure" go and uses the old way of converting.
* Move lottie_convert.py conversion code to its own file
* Add optional libtgsconverter
* Update vendor
* Apply suggestions from code review
* Update bridge/helper/libtgsconverter.go
Co-authored-by: Wim <wim@42.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Used tgbotapi caption option to attach caption to photos / documents
* remove "text/template/parse"
* added TGGetParseMode to clean up. Added tg upload function for video, audio and voice
* fixed varname Textout. Changed fileextension logic to avoid chaining regex
* fixed textout varname
* fixed parsemode varname
* gofmt
Co-authored-by: Wim <wim@42.be>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is half a fix for #874
This patch introduces a new config flag:
- MediaConvertTgs
These need to be treated independently from the existing
MediaConvertWebPToPNG flag because Tgs→WebP results in an
*animated* WebP, and the WebP→PNG converter can't handle
animated WebP files yet.
Furthermore, some platforms (like discord) don't even support
animated WebP files, so the user may want to fall back to
static PNGs (not APNGs).
The final reason why this is only half a fix is that this
introduces an external dependency, namely lottie, to be
installed like this:
$ pip3 install lottie cairosvg
This patch works by writing the tgs to a temporary file in /tmp,
calling lottie to convert it (this conversion may take several seconds!),
and then deleting the temporary file.
The temporary file is absolutely necessary, as lottie refuses to
work on non-seekable files.
If anyone comes up with a reasonable use case where /tmp is
unavailable, I can add yet another config option for that, if desired.
Telegram will bail out if the option is configured but lottie isn't found.
|
| |
|
|
|
|
| |
Use ForwardDate to check if a message is forwarded.
If we have a nil ForwardedFrom then make this an unknown user.
|
|
|
|
| |
(#1012)
|
|
|
| |
* QuoteLengthLimit option added to limit max. quoted message length if QuoteLengthLimit = 0 the whole message will be quoted
|
|
|
|
|
|
| |
(#858)
Besides the bound checking, this now also use utf16 as suggested by
https://github.com/go-telegram-bot-api/telegram-bot-api/issues/231
|
| |
|
|
|
|
| |
This reverts commit efd2c9986270a8a1dd35f896a80d6465fc52054b.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Add MediaConvertWebPToPNG option (telegram).
When enabled matterbridge will convert .webp files to .png files
before uploading them to the mediaserver of the other bridges.
Fixes #398
|
|
|
| |
* Decrease complexity in Send() (makes codeclimate happy)
|
| |
|
|
* Refactor telegram handlers. Fix linting
|