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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user