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
This commit is contained in:
spiral 2021-08-25 21:43:31 -04:00
parent f912805ecc
commit 4b944e2b20
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
18 changed files with 619 additions and 694 deletions

View file

@ -49,7 +49,7 @@ namespace PluralKit.API
Id = msg.Message.Mid.ToString(),
Channel = msg.Message.Channel.ToString(),
Sender = msg.Message.Sender.ToString(),
Member = msg.Member.ToJson(User.ContextFor(msg.System)),
Member = msg.Member.ToJson(User.ContextFor(msg.System), needsLegacyProxyTags: true),
System = msg.System.ToJson(User.ContextFor(msg.System)),
Original = msg.Message.OriginalMid?.ToString()
};