5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 03:50:26 +00:00
Commit Graph

134 Commits

Author SHA1 Message Date
Bruno Bierbaumer
6628a47f23 Add channel password support for XMPP (#451) 2018-06-18 22:55:45 +02:00
Wim
bd9ea7a88d Add MediaDownloadBlacklist option. Closes #442 2018-06-09 14:35:02 +02:00
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.
2018-06-08 22:30:35 +02:00
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
2018-05-11 23:02:43 +02:00
Wim
406a54b597 Add QuoteFormat option (telegram). Closes #413 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 #373 2018-05-01 22:23:37 +02:00
Wim
b69fc30902 Fix regression in ReplaceMessages and ReplaceNicks. Closes #407 2018-04-21 23:26:39 +02:00
Wim
e57f3a7e6c Add QuoteDisable option (telegram). Closes #399 2018-04-17 23:26:41 +02:00
Wim
e5989adf92 Add support for NoSendJoinPart. Closes #382 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
Wim
2110db6f0c Add environment override back 2018-02-27 23:22:12 +01:00
Wim
2bac867382 Refactor using factory 2018-02-27 23:22:12 +01:00
Wim
f8714d81f5 Add DebugLevel option (irc) 2018-02-22 18:56:21 +01:00
Wim
e622587db4 Add label support in RemoteNickFormat 2018-02-20 18:57:46 +01:00
Wim
7886f05e88 Download (and upload) avatar images from mattermost and telegram when mediaserver is configured. Closes #362
An extra avatarMap (cache) is created for mattermost and telegram.
If MediaServerUpload is configured, the avatar images of users are downloaded the first time a
user sends a message.
If this download succeeds a message with EVENT_AVATAR_DOWNLOAD is sent to the originating protocol.
This message also contains a SHA field (in msg.Extra["file"]), if this is not empty, the sha will
be added to the avatarMap. (so we now have a userid-sha cache)

Next time this user sends a message, the MediaServerUpload/sha/userid.png URL will be used as the
avatar field.
2018-02-20 01:15:25 +01:00
Wim
f58be0d1c1 Add SHA to FileInfo 2018-02-15 23:18:58 +01:00
Wim
2522158127 Add avator to fileinfo 2018-02-14 22:20:27 +01:00
Wim
80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See #359 2018-02-03 01:11:11 +01:00
Wim
67f6257617 Add ShowTopicChange option. Allow/disable topic change messages (currently only from slack). Closes #353 2018-02-02 21:08:13 +01:00
Wim
6a047f8722 Print only debug messages when specified (xmpp). Closes #345 2018-01-26 21:54:09 +01:00
Wim
97c944bb63 Add RejoinDelay option. Delay to rejoin after channel kick (irc). Closes #322 2017-12-23 00:11:30 +01:00
Wim
d0c4fe78ee Allow specifying maximum download size of media using MediaDownloadSize (slack,telegram,matrix) 2017-12-19 23:44:13 +01:00
Wim
265457b451 Refactor and add MediaDownloadSize to General 2017-12-19 23:15:03 +01:00
Wim
67a9d133e9 Add quick & dirty sshchat support (https://github.com/shazow/ssh-chat) 2017-12-03 01:29:25 +01:00
Wim
e0cbb69a4f Add MessageSplit option to split messages on MessageLength (irc). Closes #281 2017-11-24 23:29:00 +01:00
Wim
1efe40add5 Add initial support for an external mediaserver. #278
Add 2 extra options `MediaServerUpload` and `MediaServerDownload`, where
the URL for upload and download can be specified.

See https://github.com/42wim/matterbridge/wiki/Mediaserver-setup-%5Badvanced%5D
for an example with caddy
2017-11-24 22:36:19 +01:00
Wim
cd4c9b194f Add support for ReplaceNicks using regexp to replace nicks. Closes #269 2017-11-20 23:27:27 +01:00
Wim
aff3964078 Add support for ReplaceMessages using regexp to replace messages. #269 2017-11-15 23:33:00 +01:00
Wim
36a800c3f5 Add support for comments from slack file uploads (slack) 2017-11-13 00:20:31 +01:00
Wim
41aa8ad799 Add StripNick option, only allow alphanumerical nicks. Closes #285 2017-10-27 00:07:33 +02:00
Wim
c4b75e5754 Download files from slack and reupload to mattermost (slack/mattermost). Closes #255
Refactor message.Extra to a map[string][]interface{} to have a bit more flexibility
for stuffing extra stuff.

For attached files from slack, files < 1MB size get downloaded (in memory), and get
put into Extra["file"][]config.FileInfo (containing a pointer to the buffer and
the filename). This is not async so slack channels with lots of attached files
may suffer a slowdown. (the download timeout is set at 5 seconds).
2017-09-21 22:35:21 +02:00
Wim
b49fb2b69c Add support for Quakenet auth (irc). Closes #263 2017-09-20 22:47:26 +02:00
Wim
1a40b0c1e9 Relay attachments from mattermost to slack (slack). Closes #260 2017-09-18 23:51:27 +02:00
Wim
ed01820722 Add support for deleting messages across bridges.
Currently fully support mattermost,slack and discord.
Message deleted on the bridge or received from other bridges will be
deleted.

Partially support for Gitter.
Gitter bridge will delete messages received from other bridges.
But if you delete a message on gitter, this deletion will not be sent to
other bridges (this is a gitter API limitation, it doesn't propogate edits
or deletes via the API)
2017-09-11 22:45:15 +02:00
Wim
e7fcb25107 Add a charset option (irc). Closes #247 2017-08-29 21:31:03 +02:00
Wim
7c773ebae0 Add support for editing messages across bridges. Currently mattermost/discord.
Our Message type has an extra ID field which contains the message ID of the specific bridge.
The Send() function has been modified to return a msg ID (after the message to that specific
bridge has been created).

There is a lru cache of 5000 entries (message IDs). All in memory, so editing messages
will only work for messages the bot has seen.

Currently we go out from the idea that every message ID is unique, so we don't keep
the ID separate for each bridge. (we do for each gateway though)

If there's a new message from a bridge, we put that message ID in the LRU cache as key
and the []*BrMsgID as value (this slice contains the message ID's of each bridge that
received the new message)

If there's a new message and this message ID already exists in the cache, it must be
an updated message. The value from the cache gets checked for each bridge and if there
is a message ID for this bridge, the ID will be added to the Message{} sent to that
bridge. If the bridge sees that the ID isn't empty, it'll know it has to update the
message with that specific ID instead of creating a new message.
2017-08-28 00:33:17 +02:00
Wim
28710d0bc7 Allow a webhookurl per channel (discord). #239 2017-08-12 14:51:41 +02:00
anon724
67905089ba Add UseUserName option (discord) (#234) 2017-08-01 18:18:55 +02:00
Wim
f8e6a69d6e Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199 2017-07-30 17:48:23 +02:00
Wim
83ef61287e Refactor. Add tests 2017-07-25 20:11:52 +02:00
Wim
6dee988b76 Fix megacheck / go vet issues 2017-07-14 00:35:01 +02:00
Wim
2338c69d40 Add UseInsecureURL option (telegram) 2017-07-04 01:35:30 +02:00
Wim
830361e48b Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat) 2017-06-29 23:38:48 +02:00
Sacha Aury - Wolfman
c17512b7ab Add webhook posting mode for discord. (#204)
Using it implies to configure a Webhook on discord and set the parameter :
- WebhookURL (New parameter, discord-specific)

Discord API does not allow to change the name of the user posting, but webhooks does.
This makes the relay much more elegant, even if we might lose some more advanced features.

Signed-off-by: saury07 <sacha.aury@gmail.com>
2017-06-26 20:07:27 +02:00
Wim
1b837b3dc7 Add ShowEmbeds option (discord). #202 2017-06-24 23:17:57 +02:00
Wim
276ac840aa Add initial steam support 2017-06-22 01:02:05 +02:00
Wim
2ddc4f7ae9 Add UserID to each message. Closes #200 2017-06-18 15:44:54 +02:00
Wim
25b1af1e11 Add option IgnoreMessages to ignore messages based on regexp. (all). Closes #70 2017-06-18 01:08:11 +02:00
Wim
ad3cb0386b Add token authentication (api) 2017-06-06 00:05:32 +02:00
Wim
2eecaccd1c Change to lowercase JSON keys (api) 2017-06-05 23:18:13 +02:00
Wim
5f30a98bc1 Add gateway name to messages 2017-06-05 23:12:19 +02:00
Wim
9d9cb32f4e Limit message length (irc). Closes #179 2017-05-29 21:54:34 +02:00
Wim
2888fd64b0 Add UseFirstName option (telegram). Closes #144 2017-05-15 23:23:10 +02:00
Wim
4036d4459b Add NoHomeServerSuffix. Option to disable homeserver on username (matrix). Closes #160. 2017-05-12 23:04:58 +02:00
Wim
02612c0061 Add support for sending edited messages 2017-04-15 18:46:25 +02:00
Wim
b469c8ddbd Rejoin channel when kicked (irc). Closes #146 2017-04-08 00:42:37 +02:00
Wim
a16ad8bf3b Reuse connection when using same bridge with another gateway. See #87 2017-04-01 17:24:19 +02:00
Wim
2e4d58cb92 Refactor 2017-03-28 23:56:58 +02:00
Wim
32bbab8518 Do not use HTML parsemode by default. Set MessageFormat="HTML" to use it. (telegram) Closes #126 2017-02-24 18:50:16 +01:00
Wim
c5cfbc2297 Add matrix support 2017-02-20 00:50:37 +01:00
Wim
73f01ad8d8 Add REST API support 2017-02-18 23:13:46 +01:00
Wim
163f55f9c2 Refactor to handle disconnects/reconnects better.
Now try to reconnect every 60 seconds until forever.
2017-02-14 21:12:02 +01:00
Wim
7685fe1724 Add channel key support (irc). Closes #27 2017-01-04 14:10:35 +01:00
Wim
fee159541f Add initial Rocket.Chat support 2016-12-03 00:10:29 +01:00
Wim
e1641b2c2e Add support for RemoteNickFormat in general configuration 2016-11-20 23:33:41 +01:00
Wim
e0e1e4be80 Add gateway.inout config for bidirectional bridges. Closes #85 2016-11-20 23:01:44 +01:00
Wim
cd18d89894 Add initial telegram support 2016-11-15 23:15:57 +01:00
Wim
449ed31e25 Fix ShowJoinPart from irc bridge. Closes #72 2016-11-14 22:53:06 +01:00
Wim
99d130d1ed Refactor 2016-11-13 23:06:37 +01:00
Wim
a3dd0f1345 Add support for using avatars from discord,slack and gitter in slack 2016-11-06 00:46:32 +01:00
Wim
2dbe0eb557 Add support for dynamic IconURL (slack). Closes #43 2016-11-05 01:11:51 +01:00
Wim
be513622ac Add anti-flooding settings (irc). See #40 2016-11-01 22:52:28 +01:00
Wim
92d9db5a2d Override config from environment. See #50
Expects uppercase environment variables of MATTERBRIDGE_PROTOCOL_ACCOUNT_KEY="value"
e.g. you can override this config

[mattermost]
    [mattermost.work]
    Team="yourteam"
    Login="yourlogin"
    Password="yourpass"

by using
MATTERBRIDGE_MATTERMOST_WORK_TEAM="newteam"
MATTERBRIDGE_MATTERMOST_WORK_LOGIN="newlogin"
MATTERBRIDGE_MATTERMOST_WORK_PASSWORD="newpassword"
2016-10-30 22:32:29 +01:00
Wim
1e84afbd90 Rename discord guild to server. 2016-10-23 19:51:41 +02:00
Wim
fff6f08cb6 Add samechannel gateway. See #35 2016-09-30 23:19:47 +02:00
Wim
fd756c5332 Use specified config file 2016-09-20 23:18:51 +02:00
Wim
a0b84beb9b Add Discord support 2016-09-19 20:53:26 +02:00
Wim
7baf386ede Refactor for more flexibility
* Move from gcfg to toml configuration because gcfg was too restrictive
* Implemented gateway which has support multiple in and out bridges.
* Allow for bridging the same bridges, which means eg you can now bridge between multiple mattermosts.
* Support multiple gateways
2016-09-18 19:21:15 +02:00
Wim
b30e85836e Add Slack support 2016-09-05 16:34:37 +02:00
Wim
12389d602e Add Gitter support 2016-09-04 20:04:43 +02:00
Wim
9cb3413d9c Add Enable per section (protocol) instead of in general section 2016-08-20 18:08:57 +02:00
Wim
ff94796700 Refactor bridge. Allows bridging between every protocol 2016-08-14 22:44:59 +02:00