summaryrefslogtreecommitdiffstats
path: root/bridge
Commit message (Collapse)AuthorAgeFilesLines
* Fix Telegram Problem (unforwarded formatting and skipping of linebreaks) (#1749)Jan Martin Reckel2022-03-121-1/+18
| | | | | | | | | | | | | * 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>
* Make EditSuffix option actually work (whatsapp). Fixes #1510 (#1728)Wim2022-02-061-1/+5
| | | | To keep it backwards compatible we keep the "(edited)" message when no editsuffix is configured.
* Make HTMLDisable work correct (matrix) (#1716)Wim2022-02-061-31/+60
|
* Add support for using ID in channel config (mattermost) (#1715)Wim2022-02-063-20/+78
|
* Add UseUsername option (mattermost). Fixes #1665 (#1714)Wim2022-02-062-5/+9
|
* Add more debug options for discord (#1712)Wim2022-02-062-2/+11
| | | | | debuglevel=1 dumps every received discord event debuglevel=2 dumps every discord event we are sending to discord (also logs sensitive information)
* Add support for client certificate (irc) (#1710)Wim2022-02-051-1/+31
| | | Supports https://libera.chat/guides/certfp.html
* Add support for deleting files from slack to discord. Fixes #1705 (#1709)Wim2022-02-055-36/+108
| | | | | | | | | | | | | | | | | | | | | | | | We create a new event EventFileDelete which will be used to delete specific uploaded files using the Extra["file"] in the config.Message. We also add a new NativeID key to the FileInfo struct which will contain the native file ID of the sending bridge. When a new file is added to the config.Message.Extra["file"] map, now the bridge native file ID should be added here. When the receiving bridge receives such a message, it should keep an internal mapping of NativeID <> bridge fileid/message id. In the case of discord we map it to the resulted discord message ID after uploading it. Now when a bridge deletes a file, it should send a EventFileDelete and setting the ID to the native file ID of the bridge. When the receiving bridge will get this event it'll look into the NativeID <> bridge id mapping to find their internal ID and use it to delete the specific file on their side. For now this is implemented for slack to discord but this will be add to other bridges where useful.
* Add support for sender_chat (telegram) (#1677)Wim2022-02-041-0/+24
| | | | | | | | | | * 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
* Add Telegram Bot Command /chatId (telegram) (#1703)Ivan Zuev2022-02-031-2/+15
| | | | | | | | * 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>
* Increase batch size for conversation.list api method (slack) (#1700)Ivan Zuev2022-01-291-0/+1
| | | Co-authored-by: Ivan Zuev <i-zuev@yandex-team.ru>
* Add more ignore debug messages (mattermost) (#1678)Wim2022-01-101-1/+3
|
* Log eventtype in debug (mattermost) (#1676)Wim2022-01-101-1/+1
|
* Use current parentID if rootId is not set (mattermost) (#1675)Wim2022-01-101-2/+6
|
* Reply support for Matrix (#1664)vpzomtrrfrt2022-01-091-0/+79
| | | | | | | | | * Post replies to matrix * Handle replies from matrix * Include protocol in canonical ID return * fmt
* Remove GroupID (vk) (#1668)Daniil Suvorov2022-01-091-3/+8
|
* Add support for Harmony (#1656)Janet Blackquill2021-12-181-0/+252
| | | | | | Harmony is a relatively new (1,5yo) chat protocol with a small community. This introduces support for Harmony into Matterbridge, using the functionality specifically designed for bridge bots. The implementation is a modest 200 lines of code.
* Add comments to messages (telegram) (#1652)Soloam2021-12-121-4/+2
| | | | | | | | | | | | | * Add's comments to message in telegram messages This is a change to handle comments in telegram messages! Some messages in telegram have comments added to the message! This normally is the description in images or links. This changes appends the comment to the message if available. This should fix the issue in #1649 * [fix] discord: send comments in extras Co-authored-by: Wim <wim@42.be>
* Update telegram-bot-api to v5 (#1660)Wim2021-12-122-41/+43
|
* Fix telegram/handlers.go linting (#1658)Wim2021-12-101-5/+5
|
* Add support for code blocks in telegram (#1650)Dan Walmsley2021-12-071-0/+15
| | | | | | | | | | | * 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.
* Allow binding to IP on IRC (#1640)Santtu Lakkala2021-11-291-0/+1
| | | | Add configuration option "Bind" that is passed on to girc, allowing to choose which IP address to use on systems that have multiple ones.
* Do not fail on no avatar data (xmpp) #1529 (#1627)Polynomdivision2021-10-301-1/+7
| | | | | | | * Detect errors when working with AvatarData * Remove not neccessary line Co-authored-by: Wim <wim@42.be>
* Use a new msgID when replacing messages (xmpp). Fixes #1584 (#1623)Wim2021-10-241-1/+0
|
* Fix panic in msteams. Fixes #1588 (#1622)Wim2021-10-241-4/+6
|
* Keep the logger on a disabled bridge. Fixes #1616 (#1621)Wim2021-10-241-0/+3
|
* Add better error handling on Zulip (#1589)Alex Vandiver2021-10-231-1/+4
| | | | | | | | | | | | | | | | | | * zulip: Treat unknown errors with a 10-second backoff. An unknown error (including an unauthorized error) would fall through with no calls to time.Sleep, resulting in hammering the server as quickly as possible. Add a 10-second sleep in the default error case. The heartbeat is left with no explicit sleep, but all other codepaths now contain one. * version: Move version information into a separate package. This will allow it to be accessed by other sections of the code. * zulip: Use the matterbridge version in the user-agent. Co-authored-by: Wim <wim@42.be>
* Add UserName and RealName options for IRC (#1590)Iris Morelle2021-10-162-2/+11
| | | | | | This allows setting custom values for the IRC username/ident and real name (gecos) fields at server registration time with gIRC. Co-authored-by: Wim <wim@42.be>
* Invalidate user in cache on user change event (#1604)Jonathan Walker (Keenan)2021-10-162-0/+8
| | | Co-authored-by: Wim <wim@42.be>
* Add support for mattermost v6Wim2021-10-164-36/+409
|
* Convert .tgs with go libraries (and cgo) (telegram) (#1569)Benau2021-08-245-85/+130
| | | | | | | | | | | | | | | | 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>
* Remove newline character in bridge multiline messages (mumble) (#1572)powerjungle2021-08-221-1/+4
|
* Add support for anonymous connection (xmpp) (#1548)tytan6522021-07-311-3/+13
|
* Add space before file upload comment (slack) (#1554)Brian V2021-07-271-1/+1
|
* Fix XMPP parseNick function (#1547)tytan6522021-07-201-1/+1
|
* Add support for separate display name (nctalk) (#1506)Gary Kim2021-06-191-4/+15
| | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Add support for message deletion (nctalk) (#1492)Gary Kim2021-06-011-44/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nctalk: add message deletion support Signed-off-by: Gary Kim <gary@garykim.dev> * nctalk: seperate out deletion and sending logic Signed-off-by: Gary Kim <gary@garykim.dev> * nctalk: update library to v0.2.0 Signed-off-by: Gary Kim <gary@garykim.dev> * Rename functions to be clearer Signed-off-by: Gary Kim <gary@garykim.dev> * Update to go-nc-talk v0.2.1 Signed-off-by: Gary Kim <gary@garykim.dev> * Update to go-nc-talk v0.2.2 Signed-off-by: Gary Kim <gary@garykim.dev> * Make deletions easier to debug Signed-off-by: Gary Kim <gary@garykim.dev>
* Fix content body issue for redactions (matrix) (#1496)Gary Kim2021-05-291-7/+7
| | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Add a MessageClipped option to set your own clipped message. Closes #1359 ↵Wim2021-05-277-94/+104
| | | | (#1487)
* Support sending file URLs (nctalk) (#1489)Gary Kim2021-05-271-0/+31
| | | | | | | | | | | | * nctalk: support sending file URLs Signed-off-by: Gary Kim <gary@garykim.dev> * nctalk: reduce nesting Co-authored-by: Wim <wim@42.be> Signed-off-by: Gary Kim <gary@garykim.dev> Co-authored-by: Wim <wim@42.be>
* Make DocumentMessage handler use FileName attribute (whatsapp) (#1488)Avinash Reddy2021-05-261-2/+2
| | | | | | | * [whatsapp] make DocumentMessage handler use FileName attribute. referenced: https://github.com/Rhymen/go-whatsapp/blob/master/message.go#L582 * fix lint
* Fix crash on encountering VideoMessage (whatsapp) (#1483)Avinash Reddy2021-05-231-0/+4
| | | | | | | * [whatsapp] fix crash on encountering VideoMessage * Update handlers.go * gofmt
* Rename .jpe files to .jpg Fixes #1463 (whatsapp) (#1485)Wim2021-05-231-0/+5
|
* Handle document messages (whatsapp) (#1475)Avinash Reddy2021-05-211-0/+57
| | | | | | | | | | | * [Whatsapp] Add DocumentMessage handler * Fix typo Thanks @42wim :) Co-authored-by: Wim <wim@42.be> Co-authored-by: Wim <wim@42.be>
* Add MxId/Token login option for Matrix (#1438)Jason Robinson2021-05-172-17/+29
| | | | | | | | | | | | | * Add possibility for using MxId/Token with Matrix Makes it possible to configure a Matrix bot to use Matrix ID + Access token instead of username/password. This makes it possible to use the bot in environments where password login is disabled (for example SSO environments). Matrix user ID's are commonly referred to as "MXID's". I thought about (ab)using "Login" here but it felt like a bad idea given it's used as "username" for the password login. None of the other configuration items felt fitting. Closes #1429 * MxId -> MxID * Add err != nil to matrix.NewClient
* discord: Add AllowMention to restrict allowed mentions (#1462)Alexandre GV2021-05-134-33/+63
| | | | | | | | | | | | | | | | | | | | | | | | | * Add DisablePingEveryoneHere/DisablePingRoles/DisablePingUsers keys to config * Add basic AllowedMentions behavior to discord webhooks * Initialize b.AllowedMentions on Discord Bridger init * Call b.getAllowedMentions on each webhook to allow config hot reloading * Add AllowedMentions on all Discord webhooks/messages * Add DisablePingEveryoneHere/DisablePingRoles/DisablePingUsers to matterbridge.toml.sample * Change 'Disable' for 'Allow' and revert logic in Discord AllowedMentions * Update Discord AllowedMentions in matterbridge.toml.sample * Fix typo in DisableWebPagePreview * Replace 'AllowPingEveryoneHere' with 'AllowPingEveryone' * Replace 3 AllowPingEveryone/Roles/Users bools with an array * Fix typo
* Update vendor (#1461)Wim2021-05-052-2/+2
| | | | | * Update vendored libs * Fix slack api changes
* Adding caption to send telegram images. Fixes #1357 (#1358)Paul2021-04-032-29/+45
| | | | | | | | | | | | | | | | | * 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>
* Set ogg as default audiomessage when none found (whatsapp). Fixes #1427 (#1431)Wim2021-03-201-0/+4
|
* Declare GUILD_MEMBERS privileged intent (discord) (#1428)James Lu2021-03-201-0/+5
| | | | | | | | Without this declared, it seems that Discord will not send any member update events after connection, even if the privileged gateway intent is enabled for the bot in settings. This causes nick tracking to get out of sync when people change their nicks after the bot connects. See: https://discord.com/developers/docs/topics/gateway#gateway-intents