Commit Graph

85 Commits (d379118772aa68d0b35bb5a98b5600dc81a89197)

Author SHA1 Message Date
Wim 7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 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
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 b69fc30902 Fix regression in ReplaceMessages and ReplaceNicks. Closes #407 6 years ago
Wim e57f3a7e6c Add QuoteDisable option (telegram). Closes #399 6 years ago
Wim e5989adf92 Add support for NoSendJoinPart. Closes #382 7 years ago
Wim 98027446c8 Fix tests and make megacheck happy 7 years ago
Wim f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 7 years ago
Wim 2110db6f0c Add environment override back 7 years ago
Wim 2bac867382 Refactor using factory 7 years ago
Wim f8714d81f5 Add DebugLevel option (irc) 7 years ago
Wim e622587db4 Add label support in RemoteNickFormat 7 years ago
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.
7 years ago
Wim f58be0d1c1 Add SHA to FileInfo 7 years ago
Wim 2522158127 Add avator to fileinfo 7 years ago
Wim 80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See #359 7 years ago
Wim 67f6257617 Add ShowTopicChange option. Allow/disable topic change messages (currently only from slack). Closes #353 7 years ago
Wim 6a047f8722 Print only debug messages when specified (xmpp). Closes #345 7 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 265457b451 Refactor and add MediaDownloadSize to General 7 years ago
Wim 67a9d133e9 Add quick & dirty sshchat support (https://github.com/shazow/ssh-chat) 7 years ago
Wim e0cbb69a4f Add MessageSplit option to split messages on MessageLength (irc). Closes #281 7 years ago
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
7 years ago
Wim cd4c9b194f Add support for ReplaceNicks using regexp to replace nicks. Closes #269 7 years ago
Wim aff3964078 Add support for ReplaceMessages using regexp to replace messages. #269 7 years ago
Wim 36a800c3f5 Add support for comments from slack file uploads (slack) 7 years ago
Wim 41aa8ad799 Add StripNick option, only allow alphanumerical nicks. Closes #285 7 years ago
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).
7 years ago
Wim b49fb2b69c Add support for Quakenet auth (irc). Closes #263 7 years ago
Wim 1a40b0c1e9 Relay attachments from mattermost to slack (slack). Closes #260 7 years ago
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)
7 years ago
Wim e7fcb25107 Add a charset option (irc). Closes #247 7 years ago
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.
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 f8e6a69d6e Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199 7 years ago
Wim 83ef61287e Refactor. Add tests 7 years ago
Wim 6dee988b76 Fix megacheck / go vet issues 7 years ago
Wim 2338c69d40 Add UseInsecureURL option (telegram) 7 years ago
Wim 830361e48b Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat) 7 years ago
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>
7 years ago
Wim 1b837b3dc7 Add ShowEmbeds option (discord). #202 7 years ago
Wim 276ac840aa Add initial steam support 7 years ago
Wim 2ddc4f7ae9 Add UserID to each message. Closes #200 7 years ago