5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-09-20 10:12:31 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Wim
8e78b3e6be Fix regression in mattermost bridge (mattermost). Closes #327 2018-01-01 14:20:16 +01:00
Wim
265457b451 Refactor and add MediaDownloadSize to General 2017-12-19 23:15:03 +01:00
Wim
36a800c3f5 Add support for comments from slack file uploads (slack) 2017-11-13 00:20:31 +01:00
Wim
7aabe12acf Fix loop, make megacheck happy 2017-09-21 23:15:04 +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
47b7fae61b Fix loop from webhook by adding matterbridge prop (mattermost). Closes #261 2017-09-18 23:53:30 +02:00
Wim
1a40b0c1e9 Relay attachments from mattermost to slack (slack). Closes #260 2017-09-18 23:51:27 +02:00
Wim
82588b00c5 Use override username if specified (mattermost). #260 2017-09-18 21:18:31 +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
9039720013 Send images when text is empty regression. (mattermost). Closes #254 2017-09-08 00:16:17 +02:00
Wim
9e03fcf162 Fix private channel joining bug (mattermost). Closes #248 2017-08-30 14:01:17 +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
5a8d7b5f6d Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
Wim
7f9a400776 Add support for personal access tokens (mattermost)
* https://docs.mattermost.com/developer/personal-access-tokens.html
2017-08-23 22:49:42 +02:00
Wim
28710d0bc7 Allow a webhookurl per channel (discord). #239 2017-08-12 14:51:41 +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
ba653c0841 Ignore edited messages with reactions (mattermost) 2017-07-25 23:19:50 +02:00
Wim
0302e4da82 Fix webhookurl/webhookbindaddress panic (mattermost). Closes #221 2017-07-17 23:10:32 +02:00
Wim
4aa646f6b0 Use GetFileLinks. Also show links to non-public files (mattermost) 2017-07-15 16:51:10 +02:00
Wim
9dcd51fb80 Refactor connecting logic slack/mattermost. Fixes #216 2017-07-15 16:49:47 +02:00
Wim
6dee988b76 Fix megacheck / go vet issues 2017-07-14 00:35:01 +02:00
Wim
830361e48b Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat) 2017-06-29 23:38:48 +02:00
Wim
2ddc4f7ae9 Add UserID to each message. Closes #200 2017-06-18 15:44:54 +02:00
Wim
511f653e6e Fix incorrect behaviour of EditDisable (mattermost). Fixes #197 2017-06-15 22:45:34 +02:00
Wim
fdb57230a3 Add support for edited messages (mattermost) 2017-04-15 20:21:57 +02:00
Wim
eee0036c7f Modify iconurl correctly (mattermost). Closes #145 2017-04-08 00:16:46 +02:00
Wim
89c66b9430 Reconnect on session removal (mattermost) 2017-04-07 23:27:41 +02:00
Wim
bd38319d83 Add support for showing/hiding join/leave messages from mattermost. Closes #147 2017-04-07 22:27:36 +02:00
Wim
587ad9f41d Remove space after nick (mattermost). Closes #142 2017-04-01 17:44:17 +02: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
70c93d970c Update public links to new API (mattermost) 2016-11-26 15:46:39 +01:00
Wim
4976338677 Merge branch 'refactor' 2016-11-13 23:09:06 +01:00
Wim
99d130d1ed Refactor 2016-11-13 23:06:37 +01:00
Wim
1d5cd1d7c4 Sync with mattermost 3.5.0 2016-11-12 22:00:53 +01:00
Wim
2dbe0eb557 Add support for dynamic IconURL (slack). Closes #43 2016-11-05 01:11:51 +01:00
Wim
035dc042a1 Fix teamid bug (mattermost) 2016-10-29 16:46:02 +02:00
Wim
e93847a95e Launch every account only once. Fixes #48 2016-10-23 22:23:20 +02:00
Wim
545377742c Drop messages not from our mattermost team. Fixes #49 2016-10-23 21:16:14 +02:00
Wim
f10251a1a3 Fix mattermost bridge channel join 2016-09-30 22:59:30 +02:00
Wim
8c6be434ac Remove newline splitting from outgoing mattermost messages. Should be handled by receiving bridge. 2016-09-29 23:32:12 +02:00
Wim
272eef544f Add support for mattermost attachments. Shows public link on bridges. Closes #32 2016-09-20 23:48:58 +02:00
Wim
dce600ad51 Fix joining slack/mattermost channels using the webhook 2016-09-20 12:20:44 +02:00
Wim
002c5fd0d1 Cleanup mattermost bridge debug/info messages 2016-09-19 23:58:57 +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
106404d32f Fix info message 2016-08-20 18:08:59 +02:00
Wim
e06efbad9f Remove unused code 2016-08-20 18:08:58 +02:00
Wim
e11d786775 Move nickformatting into bridge 2016-08-20 18:08:57 +02:00
Wim
889b6debc4 Add Connect() to Bridger interface 2016-08-20 18:08:57 +02:00
Wim
6c6000dbbd Update code to mattermost 3.3.0 API changes 2016-08-15 18:49:17 +02:00
Wim
ff94796700 Refactor bridge. Allows bridging between every protocol 2016-08-14 22:44:59 +02:00