2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-11 01:10:38 +00:00
matterbridge/bridge
Ben Wiederhake b2af76e7dc
Support Telegram animated stickers (tgs) format (#1173)
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.
2020-08-23 22:34:28 +02:00
..
api Add websocket to API (#970) 2020-07-12 21:13:28 +02:00
config Support Telegram animated stickers (tgs) format (#1173) 2020-08-23 22:34:28 +02:00
discord Fix webhook EventUserAction messages being skipped (discord) (#1133) 2020-05-11 00:20:35 +02:00
gitter Fix golint linter issues and enable it in CI (#593) 2018-11-15 20:43:43 +01:00
helper Support Telegram animated stickers (tgs) format (#1173) 2020-08-23 22:34:28 +02:00
irc Skip gIRC built-in rate limiting (irc) (#1164) 2020-06-24 23:57:37 +02:00
keybase Fix go-keybase-chat-bot api changes 2020-02-08 18:33:05 +01:00
matrix Remove HTML formatting for push messages (#1188) (#1189) 2020-08-20 22:41:53 +02:00
mattermost Use mattermost v5 module (#1192) 2020-08-10 00:29:54 +02:00
msteams Ignore non-user messages (msteams). Fixes #1141 (#1149) 2020-05-24 15:49:24 +02:00
nctalk Add Nextcloud Talk support (#1167) 2020-07-18 16:08:25 +02:00
rocketchat Relay Joins/Topic changes in RocketChat bridge (#1085) 2020-04-18 22:00:35 +02:00
slack Do not use webhooks when token is configured (slack) (fixes #1123) (#1134) 2020-05-14 00:27:34 +02:00
sshchat Fix duplicated messages (sshchat). Fixes #950 (#996) 2020-02-02 22:08:37 +01:00
steam Update dependencies (#886) 2019-09-07 22:46:58 +02:00
telegram Support Telegram animated stickers (tgs) format (#1173) 2020-08-23 22:34:28 +02:00
whatsapp Handle panic in whatsapp. Fixes #1180 (#1184) 2020-07-30 23:55:31 +02:00
xmpp Prevent re-requesting avatar data (xmpp) (#1117) 2020-05-24 14:07:36 +02:00
zulip Need to specify /topic:mytopic for channel configuration (zulip). (#751) 2019-03-02 20:31:38 +01:00
bridge.go Add sane RemoteNickFormat default for API (#1157) 2020-06-25 00:25:10 +02:00