summaryrefslogtreecommitdiffstats
path: root/gateway/gateway.go
Commit message (Collapse)AuthorAgeFilesLines
* Allow origin CHANNEL to be used in RemoteNickFormat (#515)Patrick Connolly2018-10-231-0/+1
| | | | | | | | * Added origin CHANNEL to RemoteNickFormat. Updated config docs. [Fixes #515] * Update matterbridge.toml.sample Co-Authored-By: patcon <patrick.c.connolly@gmail.com>
* Add Gateway's name to RemoteNickFormat (#501)Duco van Amstel2018-10-071-0/+1
| | | | | In order to support extra use cases we should add the `{GATEWAY}` tag to the `RemoteNickFormat` string which would be replaced by the value of the `name=` field from a gateway's configuration. This is _very_ useful when you are forwarding, for example, multiple channels from one chat to a single channel on another one (one-way). It will help you identify the source channel of a message on the target chat.
* Reconnect on quit. (irc) See #431 (#445)Liam Stanley2018-06-091-12/+12
| | | | | * potential fixes for #431 * go: fix formatting/gofmt/goreturns
* Add config option MediaDownloadPath (#443)Remi Reuvekamp2018-06-081-28/+69
| | | | | | | | | | | | | | * 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.
* Add initial zulip supportWim2018-05-071-0/+2
|
* Use only alphanumeric for file uploads to mediaserver. Closes #416Wim2018-05-061-0/+6
|
* Fix crash on invalid filenamesWim2018-05-061-2/+6
|
* Fix regression on empty text with files attachedWim2018-03-061-1/+1
|
* Get the correct config values (gateway)Wim2018-03-061-3/+3
|
* Fix panic on empty config. Closes #386Wim2018-03-051-0/+1
|
* Fix tests and make megacheck happyWim2018-03-051-9/+0
|
* Use viper (github.com/spf13/viper) for configurationWim2018-03-041-25/+19
|
* Improve debug messagesWim2018-02-281-1/+2
|
* Do some small cleanupsWim2018-02-271-19/+25
|
* Add environment override backWim2018-02-271-0/+2
|
* Refactor using factoryWim2018-02-271-1/+47
|
* Allow empty messages with file urls (irc)Wim2018-02-251-1/+2
|
* Use prefixed-formatter for better loggingWim2018-02-211-13/+19
|
* Move Sirupsen => sirupsenWim2018-02-201-1/+1
|
* Add label support in RemoteNickFormatWim2018-02-201-0/+1
|
* Download (and upload) avatar images from mattermost and telegram when ↵Wim2018-02-201-5/+23
| | | | | | | | | | | | | | 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.
* Add SHA to FileInfoWim2018-02-151-0/+1
|
* Send chat notification if media is too big to be re-uploaded to MediaServer. ↵Wim2018-02-031-2/+6
| | | | See #359
* Add ShowTopicChange option. Allow/disable topic change messages (currently ↵Wim2018-02-021-0/+3
| | | | only from slack). Closes #353
* Lowercase irc channels in config. Closes #348Wim2018-01-281-0/+4
|
* Allow xmpp to receive the extra messages when text is empty. #295Wim2018-01-271-1/+2
|
* Obey the Gateway value from the json (api). Closes #344Wim2018-01-211-1/+11
|
* Make edits/delete work for bridges that gets reused. Closes #342Wim2018-01-201-4/+7
|
* Change RemoteNickFormat replacement order. Closes #336Wim2018-01-141-1/+1
|
* Add initial support for an external mediaserver. #278Wim2017-11-241-0/+31
| | | | | | | | 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
* Add support for uploaded images/video/files (matrix)Wim2017-11-221-1/+2
|
* Add support for ReplaceNicks using regexp to replace nicks. Closes #269Wim2017-11-201-0/+14
|
* Add support for ReplaceMessages using regexp to replace messages. #269Wim2017-11-151-0/+13
|
* Do not ignore empty messages with files for bridges that support itWim2017-11-121-3/+6
|
* Add StripNick option, only allow alphanumerical nicks. Closes #285Wim2017-10-271-0/+4
|
* Make [general] settings default, not total override (specifically ↵Patrick Connolly2017-10-201-2/+2
| | | | | | | | | | RemoteNickFormat) (#279) * Use general settings as default, that specific protocols override. * Fixed tab formatting. * Clarified override precedence of [general] config.
* Download files from slack and reupload to mattermost (slack/mattermost). ↵Wim2017-09-211-1/+1
| | | | | | | | | | | | 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).
* Relay attachments from mattermost to slack (slack). Closes #260Wim2017-09-181-0/+15
|
* Do not add messages without ID to cacheWim2017-08-291-1/+3
|
* Remove debug messageWim2017-08-281-3/+0
|
* Add support for editing messages across bridges. Currently mattermost/discord.Wim2017-08-281-6/+25
| | | | | | | | | | | | | | | | | | | | | | 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.
* Modify Send() to return also a message idWim2017-08-271-1/+7
|
* Handle same account in multiple gateways betterWim2017-07-301-2/+3
|
* Refactor. Add testsWim2017-07-251-112/+24
|
* Fix in/out logic. Closes #224Wim2017-07-221-24/+26
|
* Fix message modificationWim2017-07-211-5/+6
|
* Fix megacheck / go vet issuesWim2017-07-141-29/+23
|
* Replace :emoji: with unicode chars. #215Wim2017-07-091-0/+7
| | | | Add vendor github.com/peterhellberg/emojilib
* Fix samechannel gateway issue. Closes #207Wim2017-06-271-0/+12
|
* Add UserID to each message. Closes #200Wim2017-06-181-3/+0
|