Commit Graph

115 Commits (80b4cec87ae6fa85beac024e926069fcf904d347)

Author SHA1 Message Date
Wim bd0e81f5a0 Add msg event to tengo 5 years ago
Wim 2d277a15f5
Add scripting (tengo) support for every outgoing message (#806)
Adds a new key OutMessage under [tengo] table, which specifies the location of the script that
will be invoked on each message being sent to a bridge and can be used to modify the Username
and the Text of that message.

The script will have the following global variables:
read-only:
inAccount, inProtocol, inChannel, inGateway
outAccount, outProtocol, outChannel, outGateway

read-write:
msgText, msgUsername

The script is reloaded on every message, so you can modify the script on the fly.

The default script in https://github.com/42wim/matterbridge/tree/master/internal/tengo/outmessage.tengo
is compiled in and will be executed if no script is specified.
5 years ago
Wim ff198042d2 Remove deprecated TengoModifyMessage
This has become InMessage under [tengo]
5 years ago
chotaire 6b47e29583 Add verbose IRC joins/parts (ident@host) (#805)
New configuration setting: VerboseJoinPart (default is false)
5 years ago
Wim 380c38674c Fix deadlock on reconnect (irc). Closes #757 5 years ago
Wim 3c14a0891e Remove hipchat 5 years ago
Wim 7a24de15e4
Add tengo support to RemoteNickFormat (#793)
This commit add support for using the result of a tengo script in RemoteNickFormat using {TENGO}
Also adds a new toml table [tengo] with key RemoteNickFormat and value location of the script.
This also moves the TengoModifyMessage from [general] to Message in [tengo]

Documentation:

RemoteNickFormat allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
The script will have the following global variables:
to modify: result
to read: channel, bridge, gateway, protocol, nick

The result will be set in {TENGO} in the RemoteNickFormat key of every bridge where {TENGO} is specified
The script is reloaded on every message, so you can modify the script on the fly.
Example script can be found in https://github.com/42wim/matterbridge/tree/master/contrib/remotenickformat.tengo

[tengo]
RemoteNickFormat="remotenickformat.tengo"
5 years ago
Wim a60e62efb1 Update doc wrt rocketchat api issue 5 years ago
Wim cba01f0865 Update rocketchat documentation 5 years ago
Wim c557d51b6f
Need to specify /topic:mytopic for channel configuration (zulip). (#751)
Breaking change for zulip channel configuration.

For zulip the channel configuration will now need to specify also
the topic with /topic:yourtopic.

Example:
[[gateway.inout]]
account="zulip.streamchat"
channel="general/topic:mytopic"

This fixes the incorrect PR #701 which didn't work with multiple
gateways.
5 years ago
Wim 26a7e35f27
Add MediaConvertWebPToPNG option (telegram). (#741)
* 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 #398
5 years ago
Wim 1bb39eba87
Add scripting (tengo) support for every incoming message (#731)
TengoModifyMessage allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
This script will receive every incoming message and can be used to modify the Username and the Text of that message.
The script will have the following global variables:
to modify: msgUsername and msgText
to read: msgChannel and msgAccount

The script is reloaded on every message, so you can modify the script on the fly.

Example script can be found in https://github.com/42wim/matterbridge/tree/master/gateway/bench.tengo
and https://github.com/42wim/matterbridge/tree/master/contrib/example.tengo

The example below will check if the text contains blah and if so, it'll replace the text and the username of that message.
text := import("text")
if text.re_match("blah",msgText) {
    msgText="replaced by this"
    msgUsername="fakeuser"
}

More information about tengo on: https://github.com/d5/tengo/blob/master/docs/tutorial.md and
https://github.com/d5/tengo/blob/master/docs/stdlib.md
5 years ago
Wim 3190703dc8
Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730)
some examples:
this replaces a message like "Relaybot: <relayeduser> something interesting" to "relayeduser: something interesting"
ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ] ]
you can use multiple entries for multiplebots
this also replaces a message like "otherbot: (relayeduser) something else" to "relayeduser: something else"
ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ],[ "otherbot","\\((.*?)\\)\\s+" ]
OPTIONAL (default empty)
ExtractNicks=[ ["otherbot","<(.*?)>\\s+" ] ]
5 years ago
Wim 1f1634ea59 Add extra debug option (slack) 5 years ago
Declan Hoare a7dd033c3b Allow sending discriminator with Discord username (#726) 5 years ago
Krzysiek Madejski 55e79063d6 Add initial WhatsApp support (#711) 5 years ago
Wim 46f4bbb3b5 Update documentation wrt ShowJoinPart from discord 5 years ago
Wim a8fe54a78d
Allow zulip bridge to specify topic per channel. Closes #701 (#723) 5 years ago
Wim 4525fa31aa
Allow regexs in ignoreNicks. Closes #690 (#720) 5 years ago
Wim 6ebd5cbbd8 Refactor and update RocketChat bridge
* Add support for editing/deleting messages
* Add support for uploading files
* Add support for avatars
* Use the Rocket.Chat.Go.SDK
* Use the rest and streaming api
5 years ago
Patrick Connolly 25857591a2 Add note about slack/slack-legacy issues on threading. (#634) 6 years ago
Patrick Connolly f5659d455d Sync channel topics between Slack bridges (#585)
Added logic to allow for configurable synchronisation of topics and purposes of channels between Slack bridges.
6 years ago
Wim 9f66f93641
Add option to send RAW commands after connection (irc). Fixes #490 (#604) 6 years ago
jamoffat f3a5ea2956 Remove double " from Discord gateway webhookurl= (#607) 6 years ago
Wim f4d4dc91b1
Add option to ignore failing bridge on start. Fixes #455 (#603) 6 years ago
Patrick Connolly ed11686a99 Improve user_typing botname suggestion. (#580) 6 years ago
Patrick Connolly 3d281b3316 Add ability to show when user is typing across Slack bridges (#559) 6 years ago
Patrick Connolly a20b7895a9 Preserve threading between Slack instances (#529)
* Opportunistically preserve Slack threading when parent thread in cache. [#529]

* Removed slack-specific processing from gateway.

* Added docs.

* Add option to enable threading, with default to off.

* Did cleanup on @42wim's comments.

* Update gateway/gateway.go

Co-Authored-By: patcon <patrick.c.connolly@gmail.com>

* Suggestion from @42wim :)

* Suggestions from @42wim.

* More suggestions.
6 years ago
Patrick Connolly 5132d8f097 Stop setting API ring buffer capacity if not specified. (#552) 6 years ago
Patrick Connolly 291594b99c Allow origin CHANNEL to be used in RemoteNickFormat (#515)
* Added origin CHANNEL to RemoteNickFormat. Updated config docs. [Fixes #515]

* Update matterbridge.toml.sample

Co-Authored-By: patcon <patrick.c.connolly@gmail.com>
6 years ago
Wim e04dd78624 Add support for slack channels by ID. Closes #436 6 years ago
Wim 6f131250f1 Release v1.11.0 6 years ago
Bruno Bierbaumer 6628a47f23 Add channel password support for XMPP (#451) 6 years ago
Wim bd9ea7a88d Add MediaDownloadBlacklist option. Closes #442 6 years ago
Remi Reuvekamp 33bd60528b Add config option MediaDownloadPath (#443)
* Add config option MediaUploadPath

MediaDownloadPath can be used instead of MediaServerUpload, for when your
webserver is on the same system as matterbridge and matterbridge has
write access to the serve dir.

* Limit length of hash in MediaServer urls to 8chars

Full SHA256 is unnecessary for uniqueness.
Also; if a file has the same first 8 charachters of the SHA256 hash,
it's still not a problem, as long as the filename is not the same.
6 years ago
Wim 7e54474111 Add info about markdown (telegram) 6 years ago
Yuval Langer f0738a93c3 [WIP] Colorize username sent to IRC using its crc32 IEEE checksum (#423)
* Colorize username sent to IRC using its crc32 IEEE checksum

* Add `ColorNicks` configuration variable

* Add `ColorNicks` setting
6 years ago
Wim 406a54b597 Add QuoteFormat option (telegram). Closes #413 6 years ago
Wim 45296100df Add initial zulip support 6 years ago
Wim 96a47a60ad Add support for reloading all settings automatically after changing config except connection and gateway configuration. Closes #373 6 years ago
Wim e57f3a7e6c Add QuoteDisable option (telegram). Closes #399 6 years ago
Wim 062be8d7c9 Revert #378 6 years ago
Wim e5989adf92 Add support for NoSendJoinPart. Closes #382 6 years ago
Wim e622587db4 Add label support in RemoteNickFormat 6 years ago
Wim 67f6257617 Add ShowTopicChange option. Allow/disable topic change messages (currently only from slack). Closes #353 6 years ago
Wim 169c614489 Download files and reupload to supported bridges (mattermost). Closes #357 6 years ago
Wim 97c944bb63 Add RejoinDelay option. Delay to rejoin after channel kick (irc). Closes #322 7 years ago
Wim d0c4fe78ee Allow specifying maximum download size of media using MediaDownloadSize (slack,telegram,matrix) 7 years ago
Wim 27dcea7c5b Update documentation about ReplaceMessages and ReplaceNicks 7 years ago
Wim dcda7f7b8c Add documentation about MediaServerUpload and MediaServerDownload 7 years ago