Commit Graph

671 Commits (b339524613994beec40e7309e4c6db57c2b6cfe4)

Author SHA1 Message Date
Wim d5feda5c8a
Fix error loop (zulip) (#1210)
Fixes #1047
4 years ago
Wim 2f506425c2
Update whatsapp vendor and fix a panic (#1209)
* Fix another whatsapp panic

* Update whatsapp vendor
4 years ago
Wim 56159b9bce
Sleep when ratelimited on joins (matrix). Fixes #1201 (#1206) 4 years ago
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.
4 years ago
Dellle 63a1847cdc
Remove HTML formatting for push messages (#1188) (#1189)
When there is a valid HTML formatting then remove this in the cleartext
field of the matrix client. This leads to nicer push messages on
smartphone apps.

Fix #1188
4 years ago
Wim 4e50fd8649
Use mattermost v5 module (#1192) 4 years ago
Wim ebd2073144
Handle panic in whatsapp. Fixes #1180 (#1184) 4 years ago
Gary Kim 71a5b72aff
Add Nextcloud Talk support (#1167)
Signed-off-by: Gary Kim <gary@garykim.dev>
4 years ago
z3bra 213bf349c3
Add an option to log into a file rather than stdout (#1168)
Use Logfile option in the `[general]` section
4 years ago
Andrey Groshev a94fe55886
Fix MarkdownV2 support in Telegram (#1169) 4 years ago
haykam821 9b22f16497
Add websocket to API (#970)
Co-authored-by: Qais Patankar <qaisjp@gmail.com>
4 years ago
Nathanaël 1fee323247
Reload user information when a new contact is detected (whatsapp) (#1160)
Before returning an empty string, we refresh the WhatsApp contacts and if we found the one we wanted, we can return a real name. Fixes #796
4 years ago
Qais Patankar a41accd033
Add sane RemoteNickFormat default for API (#1157) 4 years ago
James Lu 37f7caf7f3
Skip gIRC built-in rate limiting (irc) (#1164)
By default, gIRC rate limits all outgoing messages. 
Since matterbridge already implements message throttling, this is extra layer of throttling is not necessary.
4 years ago
TheHolyRoger 5847f7758c
Only colour IRC nicks if there is one. (#1161) 4 years ago
Wim 7f7ca697a0
Ignore non-user messages (msteams). Fixes #1141 (#1149)
Ignore these messages for now, also add a extra
debug option for msteams so we can dump the whole
message.
4 years ago
Alexander 900375679b
Prevent re-requesting avatar data (xmpp) (#1117)
Prevent asking the server again and again for a
user's avatar if the server does not respond to
our initial request.
4 years ago
Wim 393f9e998b
Update dependencies / vendor (#1146) 4 years ago
Wim ba0bfe70a8
Add StripMarkdown option (irc). (#1145)
Enable `StripMarkdown` to strip markdown for irc.
4 years ago
Wim 3c4a3e3f75
Implement xep-0245 (xmpp). Closes #1137 (#1144) 4 years ago
Wim 274fb09ed4
Fix forward from hidden users (telegram). Closes #1131 (#1143)
Use ForwardDate to check if a message is forwarded.
If we have a nil ForwardedFrom then make this an unknown user.
4 years ago
Wim d44598a900
Add an option to disable sending HTML to matrix. Fixes #1022 (#1135) 4 years ago
Wim c9cfa59f54
Do not use webhooks when token is configured (slack) (fixes #1123) (#1134) 4 years ago
Tiago Epifânio 7062234331
Avoid creating invalid url when the user doesn't have an avatar (matrix) (#1130) 4 years ago
Qais Patankar 9754569525
Fix webhook EventUserAction messages being skipped (discord) (#1133)
Fixes #1132
4 years ago
Qais Patankar 52a071e34d
Fix #1049: missing space before embeds (discord) (#1124) 4 years ago
Qais Patankar 2d8f749e36
Fix #1120: replaceAction "_" crash (discord) (#1121) 4 years ago
Wim eaf92fca4d
Add an ID cache (discord). Fixes #1106 (#1111)
When a webhook "edits" a message, it does this by deleting the message
and creating a new one with the new content.

On creation of this new message, we'll get another ID then already is
know by the gateway in its id cache. So we add it in our own cache and
replace it whenever we want to edit/delete it again.
4 years ago
Wim d99c54343a
Remove panics and retry polling on failure (msteams). Fixes #1104 (#1105) 4 years ago
Wim e564c555d7
Clip too long messages on 3000 length (slack). Fixes #1081 (#1102) 4 years ago
Wim f7ec9af9e8
Add extra space before colon in attachments (irc). Fixes #1089 (#1101) 4 years ago
Wim 4d93a774ce
Ignore non-critical errors (whatsapp). Fixes #1094 (#1100) 4 years ago
Wim 9190365289
Add JoinDelay option (irc). Fixes #1084 (#1098) 4 years ago
Wim 57794b3b9f
Prevent image/message looping (slack). Fixes #1088 (#1096)
Also check for our matterbridge ID in Blocks set in SubMessages.
4 years ago
ldruschk 8e6ddadba2
Relay Joins/Topic changes in RocketChat bridge (#1085)
This pull request properly sets the events EventJoinLeave and EventTopicChange for messages from the RocketChat bridge and drops messages which are neither one of those events nor plain messages.
4 years ago
Alexander 7183095a28
Implement User Avatar spoofing of XMPP users (#1090)
* Implement User Avatar spoofing of XMPP users
4 years ago
Wim 8950575bfb
Update Rhymen/go-whatsapp vendor and whatsapp version (#1078) 4 years ago
Wim 8d08e348a9
Reset start timestamp on reconnect (whatsapp). Fixes #1059 (#1064) 4 years ago
Wim 29f658fd3c Use DebugWriter after upstream changes (xmpp) 4 years ago
Wim 0df2539641
Use upstream yaegashi/msgraph.go/msauth (msteams) (#1067) 4 years ago
Wim 1aa662f763
Update client version whatsapp. Fixes #1061 (#1062)
See https://github.com/Rhymen/go-whatsapp/issues/305
4 years ago
Qais Patankar 98033b1ba7
Don't transmit typing events from ourselves (slack/discord) (#1056) 4 years ago
Qais Patankar af0acf0dae
Strip extra info from emotes (discord) (#1052) 4 years ago
Qais Patankar 802c80f40c Update vendor yaegashi/msgraph.go to v0.1.2 (1) 4 years ago
Wim 281016a501
Fix duplicate separator on empty description/url (discord). Fixes #1008 (#1035)
Make this work for all possible cases.
Add tests
4 years ago
Qais Patankar d4acdf2f89
Use blocks not attachments (slack) (#1048)
This removes the extra space below messages, as shown in
https://user-images.githubusercontent.com/923242/77235190-a3359980-6bab-11ea-8b7b-697d730ae5c1.png
4 years ago
Qais Patankar 0951e75c85
Fix #1039: messages sent to Slack being synced back (#1046)
This is a regression from https://github.com/42wim/matterbridge/pull/581#issuecomment-562937576

Behaves the same as 95190f11bf
4 years ago
Jakub 6b017b226a
Support JSON and YAML config formats (#1045)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
4 years ago
Qais Patankar 9e3bd7398c
Fix #1027: warning when handling inbound webhooks (discord) (#1044) 4 years ago
Qais Patankar 79f764c7a8 Refactor webhook permission checks 4 years ago