5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 21:50:28 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
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
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
7dbebd3ea7 Show error message when file upload fails (discord) 2017-11-04 14:47:14 +01:00
Wim
0530503ef2 Make megacheck happy again 2017-11-03 20:13:58 +01:00
Wim
d1e8ff814b Add support to upload files to discord, from bridges with private urls like slack/mattermost/telegram. (discord) 2017-11-03 00:05:10 +01: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
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
e77c3eb20a Swap token/id. Also check for default webhookURL in isWebhookID (discord) 2017-08-12 16:30:00 +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
f2483af561 Do not modify username in action (discord) 2017-07-31 21:37:19 +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
04e0f001b0 Fix discordgo api changes 2017-07-16 14:39:00 +02:00
Wim
870b89a8f0 Fix embeds (discord). Closes #202 2017-07-09 13:41:46 +02:00
Wim
830361e48b Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat) 2017-06-29 23:38:48 +02:00
Wim
25ac4c708f Add more debugging (discord) 2017-06-26 23:01:35 +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
2ddc4f7ae9 Add UserID to each message. Closes #200 2017-06-18 15:44:54 +02:00
Wim
4b839b9958 Avoid nil in usermembermap (discord). See #198 2017-06-15 22:29:01 +02:00
Wim
c0c4890887 Add hashtag to channel (discord) 2017-06-03 18:21:47 +02:00
Wim
3812693111 Replace long ids in channel metions (discord). Fixes #174 2017-05-23 22:26:37 +02:00
Wim
dd3c572256 Fix possible crash on nil (discord) 2017-05-22 21:57:19 +02:00
Wim
d1dd6c3440 Add support for edited messages (discord) 2017-04-15 19:00:15 +02:00
Wim
035c2b906a Strip custom emoji metadata (discord). Closes #148 2017-04-15 16:23:34 +02:00
Wim
80895deae2 Replace role ids in mentions to role names (discord). Closes #133
* The bot needs to have the "Manage Roles" permission for this to work.
(see Server settings - Roles - General Permissions)
2017-03-18 16:50:09 +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
2d16fd085e Use nickname when present (discord). Closes #122 2017-02-13 18:52:52 +01:00
Wim
f7495dd0c3 Add bot tag to api if not specified (discord) 2016-11-14 16:30:43 +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
c3a8b7a997 Refactor modifyMessage 2016-11-04 23:03:31 +01:00
Wim
6f309f2108 Use names instead of id's for mentions (discord). Fixes #66 2016-10-30 22:55:34 +01:00
Wim
475bed5e19 Add support for discord channel ID. See #57 2016-10-26 01:01:36 +02:00
Wim
40a967523c Ignore empty content from discord. Fixes #58 2016-10-26 00:12:31 +02:00
Wim
d3a34af073 Add support for discord attachments. Fixes #59 2016-10-26 00:09:22 +02:00
Wim
1e84afbd90 Rename discord guild to server. 2016-10-23 19:51:41 +02:00
Wim
98ff59c716 Cleanup discord bridge debug/info messages 2016-09-20 00:15:30 +02:00
Wim
596096d6da Add the discord bridge for real 2016-09-19 21:05:13 +02:00