Commit Graph

25 Commits

Author SHA1 Message Date
Wim
e955a056e2
Trim <p> and </p> tags (matrix). Closes () 2019-03-03 00:29:29 +01:00
Wim
26a7e35f27
Add MediaConvertWebPToPNG option (telegram). ()
* 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 
2019-02-27 00:41:50 +01:00
Wim
bf21604d42
Make all loggers derive from non-default instance () 2019-02-23 22:51:27 +01:00
Wim
04567c765e
Add support for markdown to HTML conversion (matrix). Closes ()
This uses our own gomatrix lib with the SendHTML function which
adds HTML to formatted_body in matrix.
golang-commonmark is used to convert markdown into valid HTML.
2019-01-06 22:25:19 +01:00
Duco van Amstel
da8e415ae1 Use logrus imports instead of log () 2018-12-26 15:16:09 +01:00
Duco van Amstel
ce21ba1545 Fix golint linter issues and enable it in CI () 2018-11-15 20:43:43 +01:00
Duco van Amstel
85564a35fd Fix IRC line splitting. Closes () 2018-11-14 22:43:52 +01:00
Wim
399789811e Make gocritic linter happy 2018-11-08 00:46:34 +01:00
Duco van Amstel
d2a1dc792f Refactor and clean-up handlers. (slack) () 2018-11-07 21:35:59 +01:00
Wim
2597c9bfac Clip too long messages sent to discord (discord). Closes 2018-07-22 00:28:17 +02:00
Wim
e4b72136b8 Fix possible panic. 2018-06-19 22:53:45 +02:00
Wim
bd9ea7a88d Add MediaDownloadBlacklist option. Closes 2018-06-09 14:35:02 +02:00
Liam Stanley
51327a4056 Reconnect on quit. (irc) See ()
* potential fixes for 
* go: fix formatting/gofmt/goreturns
2018-06-09 12:47:40 +02:00
Wim
8a8b95228c Remove message newline (telegram). 2018-04-19 22:05:00 +02:00
Wim
31a752fa21 Add missing import 2018-04-19 13:04:12 +02:00
Wim
a83831e68d Remove empty newlines from messages (telegram) 2018-04-19 12:53:49 +02:00
Wim
1578ebb0e2 Refactor slack 2018-02-27 23:22:10 +01:00
Wim
bd2a672c14 Refactor mattermost 2018-02-27 23:22:09 +01:00
Wim
4c506f7cc3 Use MediaServerDownload instead of MediaServerUpload for avatars 2018-02-20 17:15:54 +01:00
Wim
7886f05e88 Download (and upload) avatar images from mattermost and telegram when mediaserver is configured. Closes
An extra avatarMap (cache) is created for mattermost and telegram.
If MediaServerUpload is configured, the avatar images of users are downloaded the first time a
user sends a message.
If this download succeeds a message with EVENT_AVATAR_DOWNLOAD is sent to the originating protocol.
This message also contains a SHA field (in msg.Extra["file"]), if this is not empty, the sha will
be added to the avatarMap. (so we now have a userid-sha cache)

Next time this user sends a message, the MediaServerUpload/sha/userid.png URL will be used as the
avatar field.
2018-02-20 01:15:25 +01:00
Wim
2b15739b48 Remove double close 2018-02-07 00:05:10 +01:00
Wim
3480c88e90 Do not close body on err. Closes 2018-02-07 00:04:02 +01:00
Wim
80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See 2018-02-03 01:11:11 +01:00
Wim
e0cbb69a4f Add MessageSplit option to split messages on MessageLength (irc). Closes 2017-11-24 23:29:00 +01:00
Wim
ba5649d259 Add helper 2017-11-04 14:55:25 +01:00