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:
spiral 2021-08-01 12:51:54 -04:00
parent 2bb8c084c9
commit dcc15dc847
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
15 changed files with 44 additions and 35 deletions

View file

@ -227,7 +227,7 @@ namespace PluralKit.Bot
{
var eb = new EmbedBuilder()
.Title("Group icon")
.Image(new(target.Icon));
.Image(new(target.Icon.TryGetCleanCdnUrl()));
if (target.System == ctx.System?.Id)
{