Commit Graph

416 Commits

Author SHA1 Message Date
spiral
c3e51d1a48
feat(apiv2): v2 json models 2021-10-12 02:19:42 -04:00
spiral
2e89310129
fix(import): add AddAccount to tx 2021-10-06 20:24:29 -04:00
spiral
502265973c
fix: explicitly return * in Patch queries
This is needed because the API takes the object from the database query to return to the user
2021-10-03 12:02:26 -04:00
spiral
92e45a07ff
refactor: add SqlKata for SQL generation, move connection handling into ModelRepository 2021-09-29 21:51:38 -04:00
spiral
dbe040f852
feat(apiv2): database changes 2021-09-26 23:18:17 -04:00
spiral
fb4aaad19f
lint 2021-09-26 22:50:08 -04:00
spiral
0517c76abf
feat: delete command messages with pk;msg -delete 2021-09-26 22:49:43 -04:00
BeautifulPixel
7d60b3e7cf
Add switch editing functionality 2021-09-26 20:08:38 -04:00
Grey Himmel
65b4f0e370
Add color to system JSON representation 2021-09-25 15:05:42 -04:00
spiral
c472a7f6df
lint/fixes, add group patch validation 2021-09-22 13:48:34 -04:00
spiral
bc2c198a82
group import/export 2021-09-21 21:42:41 -04:00
spiral
a2bf70b395
feat: don't try to match other systems' members in switch / group add commands 2021-09-13 03:14:59 -04:00
spiral
dec228d5bd
feat: add limit reach warning to pk;group new 2021-09-13 02:46:40 -04:00
Ske
9bbe9df16d Clean up a few database pool uses 2021-09-03 22:20:07 +02:00
spiral
ac2671452d
run dotnet format 2021-08-27 11:03:47 -04:00
spiral
4b944e2b20
feat: refactor external input handling code
- refactor import/export code
- make import/export use the same JSON parsing as API
- make Patch.AssertIsValid actually useful
2021-08-25 21:43:31 -04:00
spiral
603123777d
add limits to switch members and proxy tag length 2021-08-25 13:42:08 -04:00
spiral
0d583a2a6b
fix: fetch guild settings for server tag in system card 2021-08-25 12:30:42 -04:00
Ske
83212b4bb2 Don't override maximum pool size from connection string 2021-08-24 11:22:41 +02:00
spiral
50776980e5
fix: use correct git commit abbrev 2021-08-08 16:19:31 -04:00
spiral
11bd66e8d8
refactor: move JsonModelExt to PluralKit.Core (in individual model/patch files) 2021-08-08 16:10:53 -04:00
spiral
26c18d2f48
refactor: move modeltypes to own folder, move IDs to file of respective type 2021-08-08 16:10:51 -04:00
Ske
4c17ee3d89 Fix proxying in channels without message history + reduce proxy latency 2021-08-08 21:56:24 +02:00
Ske
ffe7400539 Fix system tags defaulting to off on servers with no per-guild settings 2021-08-08 15:28:21 +02:00
spiral
34a1470d1f
fix shard fetch order 2021-08-03 18:57:10 -04:00
spiral
9d4006b056
Add server-specific system tag 2021-08-02 17:22:06 -04:00
spiral
e144571904
Add banner (large) image 2021-08-02 13:46:12 -04:00
Ske
7681978435 Handle null avatar URLs (the other place too) 2021-08-02 12:22:28 +02:00
spiral
1cb4bc9287
Expose git version in 'pk;stats' and '/v1/meta' 2021-08-01 15:22:23 -04:00
spiral
dcc15dc847
Move mediaproxy URL rewriting to ProxyService
This shows full size avatars in API / cards.

Also, rewrite URLs currently stored with media.discordapp.net "back" to
cdn.discordapp.com before sending them to users.
2021-08-01 12:51:54 -04:00
spiral
3d2435eb2e
move database utils to Database/Utils, create DatabaseMigrator 2021-08-01 11:13:32 -04:00
spiral
c2b6e0eeed
Add groups to pk;admin 2021-07-08 10:04:05 -04:00
spiral
a03b5a0c95
Add NuGet lock files
Co-authored-by: Katelyn Gigante <clockwork.singularity@gmail.com>
2021-07-08 09:04:20 -04:00
Ske
ae82bb4168 Updates to Elastic logging 2021-06-10 14:21:05 +02:00
Ske
ae9ed0f4ee Store stard status in the database 2021-06-10 12:52:47 +02:00
Ske
8b948bcfbb Fix inconsistent order when pulling autoproxy members
Signed-off-by: Ske <voltasalt@gmail.com>
2021-06-09 12:26:15 +02:00
Ske
8740230c3d Add a few utility admin commands
Signed-off-by: Ske <voltasalt@gmail.com>
2021-06-08 19:37:44 +02:00
Ske
dbde8c07ad Fix a few more compiler warnings
Signed-off-by: Ske <voltasalt@gmail.com>
2021-05-07 10:56:15 +02:00
Ske
dd2c669cd2 Fix some compiler warnings
Signed-off-by: Ske <voltasalt@gmail.com>
2021-05-07 10:48:19 +02:00
Astrid
411cbdcd58
Merge pull request #316 from spiralw/feat/checkpatch
API patch improvements
2021-05-07 10:39:22 +02:00
Ske
3d624b39e4 Add message editing command
Signed-off-by: Ske <voltasalt@gmail.com>
2021-05-03 12:33:30 +02:00
spiral
517abf7ff1
feat: show member color in reply embed 2021-05-01 19:20:00 +01:00
spiral
b34ed5c4c0
API patch improvements
- add PatchObject.CheckIsValid
- use transaction when creating member, as to not create a member if the
patch is invalid
- return edited system in `PATCH /s` endpoint
2021-04-21 22:57:19 +01:00
Spectralitree
7010becd32 Add group front percentages (fixing Git history)
Signed-off-by: Ske <voltasalt@gmail.com>
2021-04-06 12:58:50 +02:00
Spectralitree
e7cfd85bd5 I messed up the branches oops 2021-03-28 12:15:21 +02:00
Spectralitree
3603d52e9e Add group and system colors 2021-03-28 12:02:41 +02:00
Spectralitree
1b791fd7f9 Merge branch 'main' of https://github.com/Spectralitree/PluralKit into main 2021-03-27 23:41:24 +01:00
Astrid
0c35975605
Merge pull request #285 from dev-kittens/fix-import
fix importing pronouns and message count
2021-03-21 13:51:16 +01:00
Ske
c7daea5497 Lower log rotation retention 2021-03-18 20:21:57 +01:00
Ske
4231709967 Remove file size limit on logs 2021-03-18 20:21:36 +01:00
spiral
2cd5047b14 fix importing pronouns and message count 2021-03-09 15:19:26 +00:00
Spectralitree
9d80b7b141 Add group front percentages
Also add a title to the system frontpercent embed, and tweak the footer
2021-02-09 23:36:43 +01:00
Ske
04109a133f Merge branch 'main' into newdiscord 2021-01-15 10:35:20 +01:00
spiral
f4ae35f9b8
Don't export IsEmpty in proxy tags 2021-01-13 21:10:51 +00:00
Ske
47b16dc51b Port more things! 2020-12-24 14:52:44 +01:00
Ske
4e5d02e1a4 Reformat replies 2020-12-20 16:58:52 +01:00
Ske
df243d4220 Add info embed to proxied replies 2020-12-20 11:38:26 +01:00
Ske
8a04ace5c7 Target .NET 5 2020-12-19 12:01:09 +01:00
Ske
dee25fcc23 Split Core modules into separate files 2020-12-19 11:56:22 +01:00
Ske
db4e41a232 Convert autoproxy timeout to use seconds 2020-12-08 12:57:17 +01:00
Astrid
77d63c2838
Merge branch 'main' into feat/ap 2020-12-08 12:25:01 +01:00
spiral
115017980e
Add pk;member group 2020-11-22 19:57:01 -05:00
spiral
8e5fb6520b Add configurable autoproxy latch timeout 2020-11-22 09:42:40 -05:00
spiral
37294b68da Add disabling autoproxy per-account 2020-11-22 09:42:40 -05:00
spiral
41247c68a6 Add disabling front/latch autoproxy per-member 2020-11-22 09:42:40 -05:00
Ske
8c12b3f037 Update library versions (still on .NET 3.1 though) 2020-11-15 14:15:30 +01:00
Ske
634173e205 Update to D#+ 4.0.0-rc1 2020-11-15 13:53:31 +01:00
spiral
71461b3163
Add looking up group by displayname; document this 2020-11-14 10:42:51 -05:00
Ske
81cd5496d5 Refactor command message deletion 2020-10-23 12:18:28 +02:00
Astrid
9976789467
Merge branch 'main' into feature/public-reminder 2020-10-23 11:13:50 +02:00
Astrid
025fbfe120
Merge pull request #228 from dev-kittens/fix/memberlimits
Fix per-system member limits not being considered in certain conditionals
2020-10-23 11:11:11 +02:00
spiral
2eade8cb8a
Fix error message when importing >1k members 2020-10-22 15:50:56 -05:00
spiral
9da023e97a
change command message timeout to 2 hours 2020-10-19 03:57:43 -05:00
dev-kittens
a5f7bacb3e
Add member is public reminder message on member creation (if system has private members) 2020-10-19 03:50:51 -05:00
spiral
ece7a523ba
whoops 2020-10-18 01:06:20 -05:00
dev-kittens
56bb5e975f
Add handling command reactions
and, uhh, rename invoker_id to author_id
2020-10-18 00:59:36 -05:00
dev-kittens
05cc30279a
- Add storing bot response messages in postgres
- Add scheduled task to clean up said store
2020-10-18 00:18:52 -05:00
Ske
9282d5e9fb Add some more resiliency to DB errors 2020-10-14 23:35:10 +02:00
dev-kittens
019800f396 Fix per-system member limit being ignored on import 2020-10-09 14:24:15 +00:00
dev-kittens
d80d3c5f04 Fix limit message on creating new members 2020-10-09 14:23:31 +00:00
Ske
5b262fdc7b Fix typo in DB migration >.> 2020-10-09 12:21:07 +02:00
Ske
1fda6ec919 Add per-system member/group limit override 2020-10-09 12:18:29 +02:00
Ske
d875472c9f Upgrade Npgsql 2020-09-09 22:23:10 +02:00
Ske
6a64a13d10 Disable App.Metrics logging under INF 2020-09-09 22:22:43 +02:00
Ske
18ac9f882d Add in-app connection string settings 2020-09-09 22:21:46 +02:00
Ske
c7612df37e Major database refactor (again) 2020-08-29 13:46:27 +02:00
Ske
a2128da2a1 Fix some ordering 2020-08-28 11:41:41 +02:00
Ske
935c9660e8 Support destructuring of proxy tag object 2020-08-28 11:37:53 +02:00
Ske
f89ca4c867 Use Serilog in API 2020-08-27 23:36:02 +02:00
Ske
9955dc29f9 Add Elastic-bound logging of (almost) all database update events 2020-08-27 21:28:36 +02:00
Ske
8d27148bdf More updates to event infrastructure 2020-08-27 18:20:20 +02:00
Ske
2d66c44848 Change group limit to 250 2020-08-26 23:22:33 +02:00
Ske
2e6b1826fc Add experimental Elasticsearch logging output 2020-08-26 22:29:24 +02:00
Ske
001aff6298 Restrict member count in group list to public members 2020-08-26 01:50:24 +02:00
Ske
0d04725a19 Include full debug symbols when building in Release mode 2020-08-25 20:36:38 +02:00
Ske
87619a728e Update group migration date 2020-08-25 19:17:16 +02:00
Ske
10d6968734 Add metrics for group count 2020-08-25 18:26:52 +02:00
Ske
8688f4d0bf Merge branch 'main' into feature/groups 2020-08-21 18:31:49 +02:00
Ske
10c01da39b Couple more slight tweaks :) 2020-08-21 17:08:49 +02:00
Ske
1bb5d203df Various additional tweaks/additions to groups 2020-08-20 21:43:17 +02:00
Ske
9e251352c7 Various fixes and improvements 2020-08-16 12:10:54 +02:00
Ske
cedb050b8a Add group delete command 2020-08-08 14:56:34 +02:00
Ske
a0fc9d3826 Move some extension methods into their respective class files 2020-08-05 20:24:51 +02:00
Ske
5e28e0aba1 Add group privacy command/structures 2020-07-28 19:17:01 +02:00
Ske
47d5ad0004 Enforce group count limit on creation 2020-07-28 19:17:01 +02:00
Ske
f47d366c8d Show member groups on member card 2020-07-28 19:17:01 +02:00
Ske
ec9ee5c794 Show member count on group card 2020-07-28 19:17:01 +02:00
Ske
9d5be07f0c Add group icon and privacy to the database schema 2020-07-28 19:17:01 +02:00
Ske
8a28d836c7 Add group member list command 2020-07-28 19:17:00 +02:00
Ske
0f4c40b344 Add group add/remove commands 2020-07-28 19:17:00 +02:00
Ske
6c5cb8cea7 Add group name/description/list commands 2020-07-28 19:17:00 +02:00
Ske
253ae43c7f Add super basic group model/command 2020-07-28 19:17:00 +02:00
Ske
94076dc9be Split HandlerQueue logic into Predicate/Handler 2020-07-22 01:19:23 +02:00
Ske
577629c28a Switch to ConcurrentDictionary for HandlerQueue 2020-07-22 01:14:45 +02:00
Ske
8b8cf932a3 Add null check in HandlerQueue 2020-07-22 01:06:26 +02:00
Ske
9f523b3c5f Refactor system/member privacy commands 2020-07-08 00:47:16 +02:00
Ske
467b95b1b1 Refactor and simplify member list code 2020-07-07 20:57:22 +02:00
Ske
9424e50187 Re-add private setters for member class 2020-07-03 11:25:05 +02:00
Ske
0598c53f62 Migrate guild objects to the patch system 2020-06-29 15:20:28 +02:00
Ske
467ce78522 Retire more IDataStore methods 2020-06-29 14:54:11 +02:00
Ske
9c1efc7886 Move system updates to the same patch system as members 2020-06-29 14:39:19 +02:00
Ske
c5697b33e2 Finally retire the PKMember setters! 2020-06-29 14:15:30 +02:00
Ske
281b669391 Refactor member updates to use a patch object 2020-06-29 13:57:48 +02:00
Ske
178e256583 Fix system guild settings model mismatch 2020-06-24 16:52:49 +02:00
Ske
3b47785aa0 Fix front percent lookup
Dapper can't map lists of ID types in an input position so we select it to a plain ulong list :)
2020-06-24 14:02:47 +02:00
Ske
4ac6465648 Fix system guild helper method (again?) 2020-06-24 14:02:47 +02:00
Fiona
2de6d399ce Create GetMemberByDisplayName() 2020-06-22 21:06:14 +10:00
Ske
6fa76e85c4 Make duration parsing case-insensitive 2020-06-21 16:07:14 +02:00
Ske
d3cf382e3b Migrate to date/time format extension methods 2020-06-21 16:05:04 +02:00
Ske
dcffbef805 Migrate to more privacy helper extensions 2020-06-21 15:51:08 +02:00
Ske
a31782864d Fix message count and created not being mapped properly
This weirdly only happens when going through ListedMember, perhaps the inheritance is making it so Dapper doesn't detect the backing field or soemthing... Adding a setter to the autoproperty makes things work, though.
2020-06-21 14:52:39 +02:00
Ske
ae4e8f97d0 Add member avatar privacy 2020-06-20 16:00:50 +02:00
Ske
dd9cc3ef0c Respect description privacy when searching members 2020-06-18 17:33:37 +02:00
Ske
56eae82b0a Move most references to PKMember.Name to go through helper extepsions for privacy 2020-06-18 17:08:36 +02:00
Ske
761270f0c3 Clean up member privacy command 2020-06-17 23:06:49 +02:00
Ske
dd2690c3f4 Get rid of compiler warning 2020-06-17 22:39:54 +02:00
Ske
e92700f339 Comment out color privacy stuff for now (revisit later?) 2020-06-17 21:51:40 +02:00
BeeFox-sys
721a4502bb
Feature/granular member privacy (#174)
* Some reasons this needs to exist for it to run on my machine? I don't think it would hurt to have it in other machines so

* Add options to member model

* Add Privacy to member embed

* Added member privacy display list

* Update database settings

* apparetnly this is nolonger needed?

* Fix sql call

* Fix more sql errors

* Added in settings control

* Add all subject to system privacy

* Basic API Privacy

* Name privacy in logs

* update todo

* remove CheckReadMemberPermission

* Added name privacy to log embed

* update todo

* Update todo

* Update api to handle privacy

* update todo

* Update systemlist full to respect privacy (as well as system list)

* include colour as option for member privacy subject

* move todo file (why was it there?)

* Update TODO.md

* Update TODO.md

* Update TODO.md

* Deleted to create pr

* Update command usage and add to the command tree

* Make api respect created privacy

* Add editing privacy through the api

* Fix pronoun privacy field in api

* Fix info leak of display name in api

* deprecate privacy field in api

* Deprecate privacy diffrently

* Update API

* Update documentation

* Update documentation

* Remove comment in yml

* Update userguide

* Update migration (fix typo in 5.sql too)

* Sanatize names

* some full stops

* Fix after merge

* update migration

* update schema version

* update edit command

* update privacy filter

* fix a dumb mistake

* clarify on what name privacy does

* make it easier on someone else

* Update docs

* Comment out unused code

* Add aliases for `member privacy all public` and `member privacy all private`
2020-06-17 21:31:39 +02:00
Ske
627f544ee8 Migrate API to ASP.NET Core Auth services + refactor 2020-06-16 01:15:59 +02:00
Ske
21f8caf006 Update type signature of MessageContext rows 2020-06-15 12:54:22 +02:00
Ske
5aa55359b3 Always return a row from message_context even with both system and guild is undefined (closes #183) 2020-06-15 12:54:00 +02:00
Ske
088bc15e5e Upgrade Autofac dependency 2020-06-15 00:52:20 +02:00
Ske
b9cbd241de Migrate to type-safe model ID structs 2020-06-14 21:37:04 +02:00
Ske
0f041c2e3c Add unit test project and some early tests 2020-06-14 18:56:53 +02:00
Ske
55b1c6499d Remove duplicated ProxyName function 2020-06-14 15:37:07 +02:00
Ske
c780781184 Remove unused imports 2020-06-13 23:12:44 +02:00
Ske
d135042a58 Change default console log level back 2020-06-13 22:39:19 +02:00
Ske
2702c45b4f General bits of cleanup 2020-06-13 22:20:24 +02:00
Ske
6d06474d26 Refactor sort/filter code once again
Now we handle sorting on the bot side, but still filter in the database
2020-06-13 21:49:31 +02:00
Ske
f1b28b7fb6 Move schema migration stuff to Database 2020-06-13 19:54:16 +02:00