mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
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.
This commit is contained in:
parent
2bb8c084c9
commit
dcc15dc847
15 changed files with 44 additions and 35 deletions
|
|
@ -16,7 +16,7 @@ namespace PluralKit.API
|
|||
o.Add("name", system.Name);
|
||||
o.Add("description", system.DescriptionFor(ctx));
|
||||
o.Add("tag", system.Tag);
|
||||
o.Add("avatar_url", system.AvatarUrl);
|
||||
o.Add("avatar_url", system.AvatarUrl.TryGetCleanCdnUrl());
|
||||
o.Add("created", system.Created.FormatExport());
|
||||
o.Add("tz", system.UiTz);
|
||||
o.Add("description_privacy", ctx == LookupContext.ByOwner ? system.DescriptionPrivacy.ToJsonString() : null);
|
||||
|
|
@ -54,7 +54,7 @@ namespace PluralKit.API
|
|||
o.Add("display_name", member.NamePrivacy.CanAccess(ctx) ? member.DisplayName : null);
|
||||
o.Add("birthday", member.BirthdayFor(ctx)?.FormatExport());
|
||||
o.Add("pronouns", member.PronounsFor(ctx));
|
||||
o.Add("avatar_url", member.AvatarFor(ctx));
|
||||
o.Add("avatar_url", member.AvatarFor(ctx).TryGetCleanCdnUrl());
|
||||
o.Add("description", member.DescriptionFor(ctx));
|
||||
|
||||
var tagArray = new JArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue