Commit Graph

786 Commits

Author SHA1 Message Date
Ske
1e1f2acdc3 Document latest API changes 2019-11-02 22:37:56 +01:00
Ske
f259beae90 Fix importing members with no proxy tags 2019-11-02 20:45:47 +01:00
Ske
6aa72f68b3 Add syntax error if pk;m proxy is missing arguments 2019-11-02 02:57:55 +01:00
Ske
6c39b7549b Fix message querying actually for real 2019-10-31 21:14:01 +01:00
Ske
0f48c6879b Attempt to fix slow/timeout-y bot startup
I've noticed the bot's CPU spiking for a few minutes as it's
just connecting, and a lot of shard connections are timing out.

I suspect it might be the overload of messages as the shards
connect and Discord sends it the entire backlog at once. So,
as an interim solution, I'm making it simply discard every
message before the socket is fully connected. Hopefully this
should help reduce the pressure.
2019-10-31 17:21:12 +01:00
Ske
f4a5b409c3 Fix message querying for real this time 2019-10-31 16:36:33 +01:00
Ske
1a79d52bfb Add importing of Tupperbox multibrackets 2019-10-30 14:11:24 +01:00
Ske
9211ce0e7f Add documentation for keepproxy feature 2019-10-30 13:59:22 +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
8604d25ffe Fix legacy prefix/suffix API fields 2019-10-30 09:19:49 +01:00
Ske
5d63181cac Fix exporting 2019-10-30 09:09:09 +01:00
Ske
acadad2a43 Add forgotten conditional to proxy tag clear disclaimer 2019-10-30 08:44:17 +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
Noko
96b03495a4 Fix import from Tupperbox regression defect (#137)
* Fix bulk importer parameter and remove unused method

-Fixes AddSwitchesBulk post-refactor by passing in the switch timestamp instead of a set of PKMembers
-Removes unused RegisterSwitches method which was replaced by AddSwitchesBulk

* Fix import from Tupperbox regression defect

When converting a Tupperbox import file to the PluralKit format on import, this sets the Tupper's name as the member ID which seems like a reasonable default. I'm also initializing the switches collection (even though it's going to be empty in this case).

This fixes a regression defect introduced when switch import was implemented.

* Making converted Tupper DataFileMember Id a GUID instead

Member names aren't necessarily unique (even if they should be), and no reason not to use something we know will be unique...
2019-10-29 08:41:44 +01:00
Ske
8f60377d63 Add support for iOS-style quotation marks 2019-10-28 20:17:20 +01:00
Ske
3c7afbfdaa Lower log level of an unnecessary webhook logging message 2019-10-28 17:03:16 +01:00
Ske
c639e9ba1e Include attachment image in message card 2019-10-28 17:02:59 +01:00
Ske
3369a06c4e Fix message querying on accounts with no roles 2019-10-28 16:50:41 +01:00
Ske
bfafdbe2bf Invalidate proxy cache when clearing proxy tags 2019-10-28 00:38:06 +01:00
Noko
eb5fe7d6a4 Allow frontpercent to accept time patterns in system timezone (#135)
The frontpercent command already accepted time patterns (e.g. 9pm), but these were always being interpreted as UTC regardless of the system's configured zone. Furthermore, the time wasn't being nudged to the previous day, so if you tried to do pk;s fp 6pm at 5pm UTC, it would complain about the date being in the future instead of just showing you since 6pm yesterday.

The system zone is now respected and nudging enabled in the same manner as pk;sw move.
2019-10-28 00:21:55 +01:00
Ske
545e8df6a7 Reduce the log level of various common events 2019-10-27 23:44:27 +01:00
Ske
823688e63d Add pk;flash command 2019-10-27 23:03:20 +01:00
Ske
fbb5dbbf5d Don't embed support server link in error message 2019-10-27 23:01:38 +01:00
Ske
46672d264c Refactor log channel storage 2019-10-27 23:01:20 +01:00
Ske
4e98a51363 Fix PermCheck permissions and no-guild invocation syntax 2019-10-27 21:58:04 +01:00
Ske
523469e5e6 Remove preemptive warning messages for unproxyable members
The member length limit is now long enough that it's unlikely to
hit the cap by accident. An error will still be displayed if you
attempt to perform a message proxy.
2019-10-27 21:57:31 +01:00
Ske
c8b4d186d8 Prioritize member lookup by name over ID 2019-10-27 20:48:48 +01:00
Ske
b19b2fbb38 Fix matching multiple consecutive quoted strings 2019-10-27 17:09:15 +01:00
Ske
7f55fca625 Make prefix matching case-insensitive 2019-10-27 15:08:33 +01:00
Ske
e6e1ab023a Fix type mismatch on system export 2019-10-27 14:49:46 +01:00
Ske
d4eae405c0 Pin to PostgreSQL 11 for the time bring 2019-10-27 13:16:00 +01:00
Ske
6538c5d054 Fix line endings in WebhookCacheService 2019-10-27 13:09:07 +01:00
Ske
aed38f37f7 Allow starting bot before all shards are up 2019-10-27 13:01:33 +01:00
Astrid
eb62602fbb
Run GH Actions check on PR 2019-10-27 12:35:13 +01:00
Noko
dd37c8a6d6 Fix bulk importer parameter and remove unused method (#136)
-Fixes AddSwitchesBulk post-refactor by passing in the switch timestamp instead of a set of PKMembers
-Removes unused RegisterSwitches method which was replaced by AddSwitchesBulk
2019-10-27 11:37:16 +01:00
Ske
bb939697d8 Add myself to FUNDING.yml 2019-10-26 19:47:58 +02:00
Ske
295f9f8abc Remove deprecated Web solution 2019-10-26 19:47:11 +02:00
Ske
6a73b3bdd6 Refactor data stores, merging the Store classes 2019-10-26 19:45:44 +02:00
Astrid
1ab84b54dd
Update dotnetcore.yml 2019-10-26 15:18:42 +02:00
Astrid
029eed3786
Merge pull request #134 from nephanim/feature/member-limit
Add members per system cap & improve import performance
2019-10-22 19:33:30 +02:00
Ske
53ae0e3d70 Improve error handling and reporting after command rewrite 2019-10-22 19:31:40 +02:00
Noko
593e9d9aef Fix edge case of importing exactly enough members to hit the cap
It's OK if import will bring us to the cap (1000), just don't let the count go beyond that.
2019-10-20 18:24:00 -05:00
Noko
406f005b4f Bulk import switches for pk;import
We're now using binary import for switches and switch_members when importing a system profile, rather than importing them one switch at a time.

This adds a pass-through method to the PerformanceTrackingConnection that can be used for other bulk import applications.
2019-10-20 14:38:43 -05:00
Noko
3d21adeec9 Fix reversal of import response messages
Some of the command rewrite changes resulted in the response messages for importing a system being swapped. When importing without an existing system (ctx.System == null), we want to display the "new system" message. Otherwise, show the count added/modified.
2019-10-20 02:22:22 -05:00
Noko
397da2e1fa Added max member count to limits
A given system can now have up to 1000 members. Within 50 members of that limit, a warning will display whenever a new member is created via the bot. Once the limit is reached, a final warning will appear indicating that no additional members can be created unless members are first deleted. Attempting to create a new member at that point by any method will result in an error message indicating that the limit has been reached.

Respecting this in pk;import required some restructuring to tease apart which members already exist and which ones need to be created prior to creating any members as it seems preferable to fail early and give the user the ability to intervene rather than pushing the system to the member cap and requiring manual deletion of "lower priority" members before others can be created. One consequence of the restructure is that existing members are being read in bulk which is a performance improvement of 25-70% depending on how many switches need to be imported (the more members you have, the more noticeable this is).
2019-10-20 02:16:57 -05:00
Noko
a277f4fb87
Merge pull request #2 from xSke/master
Merge head repository with base
2019-10-19 19:05:39 -05:00
Ske
284e8eb95a Include underscore properly in display_name API docs 2019-10-18 13:38:25 +02:00
Astrid
6db4106519
Merge pull request #121 from greysdawn/patch-2
Edit API to include member display names
2019-10-18 13:37:16 +02:00
Astrid
af4da8fd72
Merge branch 'master' into patch-2 2019-10-18 13:37:09 +02:00