fix(bot): avoid 403 status codes on image upload (#611)

This commit is contained in:
Jake Fulmine 2024-02-09 04:38:17 +01:00 committed by GitHub
parent 823db4cd24
commit 8befb1c857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 18 deletions

View file

@ -263,7 +263,7 @@ public class Groups
await AvatarUtils.VerifyAvatarOrThrow(_client, img.Url);
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { Icon = img.Url });
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { Icon = img.CleanUrl ?? img.Url });
var msg = img.Source switch
{
@ -328,7 +328,7 @@ public class Groups
await AvatarUtils.VerifyAvatarOrThrow(_client, img.Url, true);
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { BannerImage = img.Url });
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { BannerImage = img.CleanUrl ?? img.Url });
var msg = img.Source switch
{