Commit Graph

66 Commits (d379118772aa68d0b35bb5a98b5600dc81a89197)

Author SHA1 Message Date
NikkyAI 54adb0509e Fix mentions cuttíng off all text after the mention (discord) (#506) 6 years ago
Wim bd3a3b6eaf Let webhook also replace mentions (discord). Closes #502 6 years ago
NikkyAI 296428d53e Fix Discord mentions by populating the nickMemberMap at connect (#498) 6 years ago
Jerry Heiselman a431a4fa04 Replace @... string with user mention if match found (discord) (#492). Closes #460
* Added check for @-mention pattern and replacing it with a user with a matching Nick on incoming messages
6 years ago
Wim 7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 6 years ago
Wim 2597c9bfac Clip too long messages sent to discord (discord). Closes #440 6 years ago
Wim 93307b57aa Skip empty messages being sent with the webhook (discord). #469 6 years ago
Wim ed062e0ce5 Add a space before url in file uploads (discord). Closes #461 6 years ago
Wim a69ef8402b Fix previous commit 6 years ago
Wim 8779f67d2d Allow join-leave and topic changes to webhook (discord) 6 years ago
Liam Stanley 51327a4056 Reconnect on quit. (irc) See #431 (#445)
* potential fixes for #431
* go: fix formatting/gofmt/goreturns
6 years ago
ValdikSS a12a8d4fe2 Send mediaserver link to Discord in Webhook mode (discord) (#405) 6 years ago
Wim b4aa637d41 Add channel debug (discord) 7 years ago
Wim f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 7 years ago
Wim 594d2155e3 Improve debug messages 7 years ago
Wim 2bac867382 Refactor using factory 7 years ago
Wim 73525a4bbc Make gometalinter happier 7 years ago
Wim d62f49d1fc Skip events for webhook 7 years ago
Wim 3d8f15c20b Refactor discord 7 years ago
Wim d1227b5fc9 Use prefixed-formatter for better logging 7 years ago
Wim 6ea368c383 Move Sirupsen => sirupsen 7 years ago
Wim a082b5a590 Remove unused code 7 years ago
Wim bae9484df2 Use discordgo ContentWithMoreMentionsReplace (discord) 7 years ago
Wim 83c28cb857 Check for a valid WebhookURL (discord). Closes #367 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 265457b451 Refactor and add MediaDownloadSize to General 7 years ago
Wim 36a800c3f5 Add support for comments from slack file uploads (slack) 7 years ago
Wim 7dbebd3ea7 Show error message when file upload fails (discord) 7 years ago
Wim 0530503ef2 Make megacheck happy again 7 years ago
Wim d1e8ff814b Add support to upload files to discord, from bridges with private urls like slack/mattermost/telegram. (discord) 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 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) 8 years ago