mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
DRY-ify checking URL length for avatars
This commit is contained in:
parent
7f82a3e63a
commit
05f1ee92ea
4 changed files with 4 additions and 12 deletions
|
|
@ -140,8 +140,6 @@ namespace PluralKit.Bot
|
|||
|
||||
async Task SetIcon(ParsedImage img)
|
||||
{
|
||||
if (img.Url.Length > Limits.MaxUriLength)
|
||||
throw Errors.InvalidUrl(img.Url);
|
||||
await AvatarUtils.VerifyAvatarOrThrow(img.Url);
|
||||
|
||||
await _db.Execute(c => _repo.UpdateSystem(c, ctx.System.Id, new SystemPatch {AvatarUrl = img.Url}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue