2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-09 07:10:25 +00:00
Commit Graph

79 Commits

Author SHA1 Message Date
Wim
e3cb665d92 Make discord user token work correctly (discord) #689 2019-01-19 20:39:58 +01:00
Wim
d99eacc2e1 Run go fmt 2019-01-14 19:41:32 +01:00
Zomboy Alfrir
62e55214fc Allow to bridge non-bot Discord users (discord) (#689)
If you prefix a token with `User ` it'll treat is as a user token.

Co-Authored-By: zomboy-alfrir <zomboy@dancodes.com.ar>
2019-01-14 19:27:49 +01:00
James Nylen
5193634a52 Use only one webhook if possible (discord) (#681) 2019-01-09 21:28:47 +01:00
Wim
46e2683995 Add file comment to webhook messages (discord). Fixes #358 2019-01-07 22:16:00 +01:00
James Nylen
492722af8b Improve error reporting on failure to join Discord. Fixes #672 (#680) 2019-01-07 21:39:53 +01:00
Duco van Amstel
0365c0786a Split Discord bridge in multiple files (#632) 2018-12-07 23:36:01 +01:00
Wim
df02f51c56 Fix regression on using server ID (discord). #619 #617 2018-11-28 23:50:40 +01:00
Wim
c6fd65d1d7 Limit discord username via webhook to 32 chars 2018-11-23 20:52:31 +01:00
Duco van Amstel
ce21ba1545 Fix golint linter issues and enable it in CI (#593) 2018-11-15 20:43:43 +01:00
Wim
f8dc24bc09 Switch back go upstream bwmarrin/discordgo
Commit ffa9956c9b got merged in.
2018-11-13 00:02:07 +01:00
Wim
399789811e Make gocritic linter happy 2018-11-08 00:46:34 +01:00
David Hill
0e2522279e Clean up various stuff (#508)
* various cleanups
2018-11-07 20:36:50 +01:00
NikkyAI
54adb0509e Fix mentions cuttíng off all text after the mention (discord) (#506) 2018-09-29 20:02:59 +02:00
Wim
bd3a3b6eaf Let webhook also replace mentions (discord). Closes #502 2018-09-22 22:15:19 +02:00
NikkyAI
296428d53e Fix Discord mentions by populating the nickMemberMap at connect (#498) 2018-09-17 21:25:06 +02:00
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
2018-09-12 22:30:14 +02:00
Wim
7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 2018-08-06 21:11:13 +02:00
Wim
2597c9bfac Clip too long messages sent to discord (discord). Closes #440 2018-07-22 00:28:17 +02:00
Wim
93307b57aa Skip empty messages being sent with the webhook (discord). #469 2018-07-21 23:19:11 +02:00
Wim
ed062e0ce5 Add a space before url in file uploads (discord). Closes #461 2018-06-29 22:35:29 +02:00
Wim
a69ef8402b Fix previous commit 2018-06-28 21:19:02 +02:00
Wim
8779f67d2d Allow join-leave and topic changes to webhook (discord) 2018-06-28 21:14:31 +02:00
Liam Stanley
51327a4056 Reconnect on quit. (irc) See #431 (#445)
* potential fixes for #431
* go: fix formatting/gofmt/goreturns
2018-06-09 12:47:40 +02:00
ValdikSS
a12a8d4fe2 Send mediaserver link to Discord in Webhook mode (discord) (#405) 2018-04-17 23:52:48 +02:00
Wim
b4aa637d41 Add channel debug (discord) 2018-03-17 22:56:58 +01:00
Wim
f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 2018-03-04 23:52:14 +01:00
Wim
594d2155e3 Improve debug messages 2018-02-28 22:23:29 +01:00
Wim
2bac867382 Refactor using factory 2018-02-27 23:22:12 +01:00
Wim
73525a4bbc Make gometalinter happier 2018-02-27 23:22:10 +01:00
Wim
d62f49d1fc Skip events for webhook 2018-02-27 23:22:10 +01:00
Wim
3d8f15c20b Refactor discord 2018-02-27 23:22:09 +01:00
Wim
d1227b5fc9 Use prefixed-formatter for better logging 2018-02-21 00:20:25 +01:00
Wim
6ea368c383 Move Sirupsen => sirupsen 2018-02-20 23:41:09 +01:00
Wim
a082b5a590 Remove unused code 2018-02-15 00:07:25 +01:00
Wim
bae9484df2 Use discordgo ContentWithMoreMentionsReplace (discord) 2018-02-14 23:05:50 +01:00
Wim
83c28cb857 Check for a valid WebhookURL (discord). Closes #367 2018-02-07 14:57:38 +01:00
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