Ske
f27e864731
Fix autoproxying someone else's bare tags
2020-02-03 16:10:43 +01:00
Ske
6863da9462
Disable Discord member caching entirely
2020-02-01 15:00:36 +01:00
Ske
82dfe43d5a
Rework caching
...
This does a *lot* of things. Essentially, it replaces the existing
individual proxy- and autoproxy caches on the bot end with a
global cache (in Core) that handles all the caching at once, and
automatically invalidates the cache once something changes in the
datastore.
This allows us to do proxying and autoproxying with *zero database
queries* (best-case).
2020-02-01 14:40:57 +01:00
Ske
3ba6a115f0
Correct autoproxy escape character
2020-01-25 17:40:41 +01:00
Ske
83cfb3eb46
Add autoproxy functionality
2020-01-24 20:28:48 +01:00
Ske
cb1c44a27f
Bail early if we don't have send message permission when proxying
2020-01-08 12:16:27 +01:00
Ske
73b2631280
Optimize database queries for proxy filtering
2019-12-28 12:00:52 +01:00
Ske
4d07886ec8
Add server-specific display names
2019-12-26 20:39:47 +01:00
Ske
633627c30a
Fix image-only proxies where the tags have trailing/leading spaces
2019-12-26 19:19:06 +01:00
Ske
5ff32ea6b4
Re-enable proxy attachments
2019-12-23 13:55:43 +01:00
Ske
58cdb04ab9
Practice better disposal hygiene
2019-12-23 01:58:10 +01:00
Ske
05282fd167
Reuse a singleton HttpClient for proxying
2019-12-23 00:29:04 +01:00
Ske
cb836d5f7e
Remove the ping reaction afterwards
2019-12-22 14:44:14 +01:00
Ske
639c813ce7
Add per-server per-system proxy enable toggle
2019-12-22 14:15:56 +01:00
Ske
857b0488b9
Add member pinging by reaction
2019-12-22 13:54:18 +01:00
Ske
d42dea9e9f
Allow multiple proxy attachments
2019-12-21 20:07:51 +01:00
Ske
378cba09e5
Add channel blacklists for logging and proxying
...
Necessary database migrations for this commit:
alter table servers add column log_blacklist bigint[] not null default array[]::bigint[];
alter table servers add column blacklist bigint[] not null default array[]::bigint[];
2019-11-03 19:15:50 +01:00
Ske
49dc25ee02
Allow keeping proxy tags when proxying messages.
...
Required database migration:
Closes #75 .
2019-10-30 09:26:50 +01:00
Ske
b50c123ad4
Properly sort proxies before matching
2019-10-30 08:30:58 +01:00
Ske
393ee16c1b
Add support for multiple proxy tags
...
Tangentially closes #103 .
2019-10-30 08:18:59 +01:00
Ske
6a73b3bdd6
Refactor data stores, merging the Store classes
2019-10-26 19:45:44 +02:00
Ske
1988b29fbc
Refactor command system
2019-10-05 07:41:00 +02:00
Ske
74e0508065
Increase webhook name limit to 80
2019-08-14 07:16:48 +02:00
Ske
145ecb91ad
Refactor proxy service
2019-08-12 05:47:55 +02:00
Ske
17c8b7b765
Properly retry client creation on failure
2019-08-12 04:42:16 +02:00
Ske
5b13c1b100
Cache the entire webhook client rather than just the token
2019-08-12 04:32:01 +02:00
Ske
1b32cd8b6d
Log webhook send progress
2019-08-12 04:16:17 +02:00
Ske
aa04d2055e
Avoid deleting messages from the store if they're not webhooks
2019-08-12 03:51:54 +02:00
Ske
423d23faf7
Cache account lookup in memory when proxying
2019-08-12 03:48:08 +02:00
Ske
a689d61788
Collect webhook response time and shard latency
2019-08-12 00:57:23 +02:00
Ske
200ba6d84c
Add member proxy display names
2019-08-09 10:12:38 +02:00
xBelladonna
fabf772085
Return original message ID to log channel
...
Logs the original (deleted) message's ID in addition to the proxied message's ID to the log channel if configured
2019-08-08 11:01:36 +02:00
Ske
59dbc5368b
Filter everyone/here pings if the proxy sender doesn't have permission
2019-07-28 15:38:41 +02:00
Ske
defbf37cfe
Fall back to system avatar when no member avatar is set
2019-07-26 11:08:06 +02:00
Ske
b14666aa4f
Store the ID of the trigger message in the database
2019-07-24 13:38:54 +02:00
Ske
11eabe2e3d
Update D.NET version and add bulk deletion support
2019-07-21 17:16:04 +02:00
Ske
45f468fe21
Properly clean up after proxy operations
2019-07-21 04:27:04 +02:00
Ske
52962f1b97
Bounds check proxy tags before extracting inner message
2019-07-19 02:14:46 +02:00
Ske
1577eb7041
Log channel ID rather than name
2019-07-18 17:29:09 +02:00
Ske
961bfe9094
Add basic logging framework
2019-07-18 17:13:42 +02:00
Ske
a188c64a0e
Clean up unused imports
2019-07-17 13:38:23 +02:00
Ske
2d58705e85
Add basic WIP metrics system
2019-07-16 21:59:06 +02:00
Ske
206d403526
Ignore proxying messages with no content and no attachment
2019-07-15 21:37:34 +02:00
Ske
6668cd8d2d
Swallow 404 when deleting proxied message
2019-07-15 21:36:12 +02:00
Ske
3a6e061e44
Avoid making an extra request to fetch message body in webhooks
2019-07-15 17:53:01 +02:00
Ske
c6d6a728c9
Fix proxying members named 'Clyde'
2019-07-14 21:27:13 +02:00
Ske
ebc311ecc3
Remove message query reaction AND open DB connection when obtaining one
2019-07-14 05:23:27 +02:00
Ske
d829630a35
Fix database connection pool contention (maybe)
...
Instead of acquiring a connection per service per request, we
acquire connections more often but at a more granular level, meaning
they're also disposed of more quickly instead of staying for a long time
in case of long-running commands or leaks.
2019-07-11 21:25:23 +02:00
Ske
ca56fd419b
Fix various issues with proxying and webhook caching
2019-07-10 23:16:17 +02:00
Ske
740ccf6979
Fix sending message attachments
2019-07-10 12:52:02 +02:00