3
0
mirror of https://github.com/42wim/matterbridge.git synced 2024-12-30 23:22:34 +01:00
Commit Graph

122 Commits

Author SHA1 Message Date
Qais Patankar
a41accd033
Add sane RemoteNickFormat default for API () 2020-06-25 00:25:10 +02:00
Wim
ba0bfe70a8
Add StripMarkdown option (irc). ()
Enable `StripMarkdown` to strip markdown for irc.
2020-05-23 21:46:15 +02:00
Wim
d44598a900
Add an option to disable sending HTML to matrix. Fixes () 2020-05-14 00:37:41 +02:00
Wim
9190365289
Add JoinDelay option (irc). Fixes () 2020-04-19 00:46:35 +02:00
Jakub
6b017b226a
Support JSON and YAML config formats ()
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-18 23:20:29 +01:00
Wim
795a8705c3 Add initial Microsoft Teams support
Documentation on https://github.com/42wim/matterbridge/wiki/MS-Teams-setup
2020-03-01 22:19:33 +01:00
Qais Patankar
c91bfd08d8 Add ability to procure avatars from the destination bridge ()
* remote_avatar: add UseLocalAvatar

* remote_avatar: make sure msg.Protocol is always set correctly

* remote_avatars: support msg.Account

* remote_avatar: add to matterbridge.toml.sample

* remote_avatar: clarify something
2020-02-09 22:07:26 +01:00
Wim
f8ad877601
Add DisableWebPagePreview option (telegram). Closes () 2020-02-02 18:53:04 +01:00
Humorhenker
fc30b1bacc
Add QuoteLengthLimit option (telegram) fixes ()
* QuoteLengthLimit option added to limit max. quoted message length if QuoteLengthLimit = 0 the whole message will be quoted
2020-01-30 00:02:33 +01:00
Wim
28783a4146
Do configuration validation on start-up. Fixes ()
Fail if:
* we don't have any gateways configured
* we have gateways configured but with non-existing bridge configuration
* we have gateways configured without any configuration
2019-09-09 23:48:00 +02:00
cori hudson
921f2dfcdf Add initial Keybase Chat support ()
* initial work on native keybase bridging

* Hopefully make a functional keybase bridge

* add keybase to bridgemap

* send to right channel, try to figure out received msgs

* add account and userid

* i am a Dam Fool

* Fix formatting for messages, handle /me

* update vendors, ran golint and goimports

* move handlers to handlers.go, clean up unused config options

* add sample config, fix inconsistent remote nick handling

* Update readme with keybase links

* Resolve fixmie errors

* Error -> Errorf

* fix linting errors in go.mod and go.sum

* explicitly join channels, ignore messages from non-specified channels

* check that team names match before bridging message
2019-08-26 21:00:31 +02:00
Joona Hoikkala
80b4cec87a Add an option to skip the Mattermost server version check ()
Adds SkipVersionCheck bool option for mattermost
2019-06-16 16:23:50 +02:00
Wim
e610fb3201 Make config parse errors readable 2019-06-02 09:35:20 +01:00
Wim
2d277a15f5
Add scripting (tengo) support for every outgoing message ()
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.
2019-04-19 18:27:31 +02:00
chotaire
6b47e29583 Add verbose IRC joins/parts (ident@host) ()
New configuration setting: VerboseJoinPart (default is false)
2019-04-18 23:56:05 +02:00
Wim
7a24de15e4
Add tengo support to RemoteNickFormat ()
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"
2019-04-08 20:58:21 +02:00
Wim
26a7e35f27
Add MediaConvertWebPToPNG option (telegram). ()
* 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 
2019-02-27 00:41:50 +01:00
Wim
bf21604d42
Make all loggers derive from non-default instance () 2019-02-23 22:51:27 +01:00
Wim
1bb39eba87
Add scripting (tengo) support for every incoming message ()
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
2019-02-23 16:39:44 +01:00
Declan Hoare
a7dd033c3b Allow sending discriminator with Discord username () 2019-02-22 14:28:27 +01:00
Krzysiek Madejski
55e79063d6 Add initial WhatsApp support () 2019-02-21 20:28:13 +01:00
Wim
a8fe54a78d
Allow zulip bridge to specify topic per channel. Closes () 2019-02-17 21:50:05 +01:00
Wim
fb713ed91b
Add initial support for getting ChannelMember info of all bridges ()
* Add initial support for getting ChannelMember info of all bridges.

Adds an EventGetChannelMembers event, which gets send every x time to
all bridges. Bridges should respond on this event with a Message
containing ChannelMembers in the EventGetChannelMembers key in the
Extra field.

handleEventGetChannelMembers will handle this Message and sets the
contained ChannelMembers to the Bridge struct.

* Add ChannelMembers support to the slack bridge
2019-01-18 18:35:31 +01:00
Wim
bab385c342 Remove unused key (config) 2019-01-04 16:37:45 +01:00
Duco van Amstel
da8e415ae1 Use logrus imports instead of log () 2018-12-26 15:16:09 +01:00
Patrick Connolly
f5659d455d Sync channel topics between Slack bridges ()
Added logic to allow for configurable synchronisation of topics and purposes of channels between Slack bridges.
2018-11-26 09:47:04 +00:00
Wim
9f66f93641
Add option to send RAW commands after connection (irc). Fixes () 2018-11-25 19:32:16 +01:00
Wim
f4d4dc91b1
Add option to ignore failing bridge on start. Fixes () 2018-11-25 10:35:35 +01:00
Duco van Amstel
ce21ba1545 Fix golint linter issues and enable it in CI () 2018-11-15 20:43:43 +01:00
Duco van Amstel
85564a35fd Fix IRC line splitting. Closes () 2018-11-14 22:43:52 +01:00
Duco van Amstel
16d5aeac7c Make config.Config more unit-test friendly () 2018-11-13 23:30:56 +01:00
Duco van Amstel
e19ba5a06a Add new Slack connection and forked legacy Slack bridge () 2018-11-13 20:51:19 +01:00
Patrick Connolly
3d281b3316 Add ability to show when user is typing across Slack bridges () 2018-11-08 20:45:40 +01:00
Patrick Connolly
f2703979a4 Clean up config loading. () 2018-11-07 22:32:12 +01:00
Patrick Connolly
a20b7895a9 Preserve threading between Slack instances ()
* Opportunistically preserve Slack threading when parent thread in cache. []

* 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.
2018-11-07 09:14:31 +01:00
Patrick Connolly
7e62bc4819 Remove hyphens when auto-loading envvars from viper config ()
* When auto-loading envvars from toml keys, remove hyphens.

See: https://unix.stackexchange.com/questions/23659/can-shell-variable-include-character
2018-11-03 14:42:27 +01:00
NikkyAI
d058be25ad Respond with message on connect (api) ()
fix 
2018-11-02 16:35:13 +01:00
Wim
7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 2018-08-06 21:11:13 +02:00
Bruno Bierbaumer
6628a47f23 Add channel password support for XMPP () 2018-06-18 22:55:45 +02:00
Wim
bd9ea7a88d Add MediaDownloadBlacklist option. Closes 2018-06-09 14:35:02 +02:00
Remi Reuvekamp
33bd60528b Add config option MediaDownloadPath ()
* 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.
2018-06-08 22:30:35 +02:00
Yuval Langer
f0738a93c3 [WIP] Colorize username sent to IRC using its crc32 IEEE checksum ()
* Colorize username sent to IRC using its crc32 IEEE checksum

* Add `ColorNicks` configuration variable

* Add `ColorNicks` setting
2018-05-11 23:02:43 +02:00
Wim
406a54b597 Add QuoteFormat option (telegram). Closes 2018-05-11 20:59:15 +02:00
Wim
45296100df Add initial zulip support 2018-05-07 21:35:48 +02:00
Wim
96a47a60ad Add support for reloading all settings automatically after changing config except connection and gateway configuration. Closes 2018-05-01 22:23:37 +02:00
Wim
b69fc30902 Fix regression in ReplaceMessages and ReplaceNicks. Closes 2018-04-21 23:26:39 +02:00
Wim
e57f3a7e6c Add QuoteDisable option (telegram). Closes 2018-04-17 23:26:41 +02:00
Wim
e5989adf92 Add support for NoSendJoinPart. Closes 2018-03-06 21:35:47 +01:00
Wim
98027446c8 Fix tests and make megacheck happy 2018-03-05 00:30:46 +01:00
Wim
f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 2018-03-04 23:52:14 +01:00