Commit Graph

104 Commits (d44d2a5f0014fda12ce78d35e416dffab6b7c04a)

Author SHA1 Message Date
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
Wim e0cbb69a4f Add MessageSplit option to split messages on MessageLength (irc). Closes #281 7 years ago
Wim 41aa8ad799 Add StripNick option, only allow alphanumerical nicks. Closes #285 7 years ago
Patrick Connolly 95a0229aaf Fix outdated sample config on slack channel format. (#280) 7 years ago
Patrick Connolly 915a8fbad7 Make [general] settings default, not total override (specifically RemoteNickFormat) (#279)
* Use general settings as default, that specific protocols override.

* Fixed tab formatting.

* Clarified override precedence of [general] config.
7 years ago
Wim b49fb2b69c Add support for Quakenet auth (irc). Closes #263 7 years ago
Ryan Mulligan a37b232dd9 remove comment about useAPI in sample configuration (#251) 7 years ago
Wim e7fcb25107 Add a charset option (irc). Closes #247 7 years ago
Wim 7f9a400776 Add support for personal access tokens (mattermost)
* https://docs.mattermost.com/developer/personal-access-tokens.html
7 years ago
Wim 28710d0bc7 Allow a webhookurl per channel (discord). #239 7 years ago
anon724 67905089ba Add UseUserName option (discord) (#234) 7 years ago
Wim 2338c69d40 Add UseInsecureURL option (telegram) 7 years ago