mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +00:00
Fix avatar URLs with encoded spaces
This commit is contained in:
parent
7b59040da2
commit
5ba89d32fc
1 changed files with 3 additions and 1 deletions
|
|
@ -39,7 +39,9 @@ namespace PluralKit.Bot
|
||||||
|
|
||||||
if (uri.Scheme != "http" && uri.Scheme != "https")
|
if (uri.Scheme != "http" && uri.Scheme != "https")
|
||||||
throw Errors.InvalidUrl(arg);
|
throw Errors.InvalidUrl(arg);
|
||||||
return new ParsedImage {Url = TryRewriteCdnUrl(uri.ToString()), Source = AvatarSource.Url};
|
|
||||||
|
// ToString URL-decodes, which breaks URLs to spaces; AbsoluteUri doesn't
|
||||||
|
return new ParsedImage {Url = TryRewriteCdnUrl(uri.AbsoluteUri), Source = AvatarSource.Url};
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have an attachment, use that
|
// If we have an attachment, use that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue