Commit Graph

36 Commits (4bda29cb3896ac65c3aafa784c8faac73c3c111b)

Author SHA1 Message Date
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 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 5a8d7b5f6d Modify Send() to return also a message id 7 years ago
Wim e77c3eb20a Swap token/id. Also check for default webhookURL in isWebhookID (discord) 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 f2483af561 Do not modify username in action (discord) 7 years ago
Wim f8e6a69d6e Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199 7 years ago
Wim 04e0f001b0 Fix discordgo api changes 7 years ago
Wim 870b89a8f0 Fix embeds (discord). Closes #202 7 years ago
Wim 830361e48b Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat) 7 years ago
Wim 25ac4c708f Add more debugging (discord) 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 2ddc4f7ae9 Add UserID to each message. Closes #200 7 years ago
Wim 4b839b9958 Avoid nil in usermembermap (discord). See #198 7 years ago
Wim c0c4890887 Add hashtag to channel (discord) 7 years ago
Wim 3812693111 Replace long ids in channel metions (discord). Fixes #174 7 years ago
Wim dd3c572256 Fix possible crash on nil (discord) 7 years ago
Wim d1dd6c3440 Add support for edited messages (discord) 7 years ago
Wim 035c2b906a Strip custom emoji metadata (discord). Closes #148 7 years ago
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)
7 years ago
Wim 163f55f9c2 Refactor to handle disconnects/reconnects better.
Now try to reconnect every 60 seconds until forever.
8 years ago
Wim 2d16fd085e Use nickname when present (discord). Closes #122 8 years ago
Wim f7495dd0c3 Add bot tag to api if not specified (discord) 8 years ago
Wim 99d130d1ed Refactor 8 years ago
Wim a3dd0f1345 Add support for using avatars from discord,slack and gitter in slack 8 years ago
Wim 2dbe0eb557 Add support for dynamic IconURL (slack). Closes #43 8 years ago
Wim c3a8b7a997 Refactor modifyMessage 8 years ago
Wim 6f309f2108 Use names instead of id's for mentions (discord). Fixes #66 8 years ago
Wim 475bed5e19 Add support for discord channel ID. See #57 8 years ago
Wim 40a967523c Ignore empty content from discord. Fixes #58 8 years ago
Wim d3a34af073 Add support for discord attachments. Fixes #59 8 years ago
Wim 1e84afbd90 Rename discord guild to server. 8 years ago
Wim 98ff59c716 Cleanup discord bridge debug/info messages 8 years ago
Wim 596096d6da Add the discord bridge for real 8 years ago