mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +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
|
|
@ -29,6 +29,6 @@ namespace PluralKit.Core
|
|||
group.DescriptionPrivacy.Get(ctx, group.Description);
|
||||
|
||||
public static string? IconFor(this PKGroup group, LookupContext ctx) =>
|
||||
group.IconPrivacy.Get(ctx, group.Icon);
|
||||
group.IconPrivacy.Get(ctx, group.Icon?.TryGetCleanCdnUrl());
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ namespace PluralKit.Core {
|
|||
member.NamePrivacy.Get(ctx, member.Name, member.DisplayName ?? member.Name);
|
||||
|
||||
public static string AvatarFor(this PKMember member, LookupContext ctx) =>
|
||||
member.AvatarPrivacy.Get(ctx, member.AvatarUrl);
|
||||
member.AvatarPrivacy.Get(ctx, member.AvatarUrl.TryGetCleanCdnUrl());
|
||||
|
||||
public static string DescriptionFor(this PKMember member, LookupContext ctx) =>
|
||||
member.DescriptionPrivacy.Get(ctx, member.Description);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue