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'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>
* 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.
* 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>
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>
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>
* 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>
* 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>
* 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
* 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
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
* Use valid transmitter Log default (discord)
Using a logger created by `log.NewEntry(nil)` would crash. (matterbridge does not encounter this issue as it updates the Log field manually.)
* Add mod_slack_webhook support to the XMPP bridge
* Replace b.webhookURL with b.GetString
* Do not return a message ID on webhook POST
* Add the XMPP webhook to the sample configuration