Fix auth checking when looking up member avatar

This commit is contained in:
Ske 2020-06-20 16:10:22 +02:00
parent ae4e8f97d0
commit c428d95479

View File

@ -48,7 +48,7 @@ namespace PluralKit.Bot
var currentValue = location == AvatarLocation.Member ? target.AvatarUrl : guildData?.AvatarUrl; var currentValue = location == AvatarLocation.Member ? target.AvatarUrl : guildData?.AvatarUrl;
var canAccess = location != AvatarLocation.Member || target.AvatarPrivacy.CanAccess(ctx.LookupContextFor(target)); var canAccess = location != AvatarLocation.Member || target.AvatarPrivacy.CanAccess(ctx.LookupContextFor(target));
if (string.IsNullOrEmpty(currentValue) && !canAccess) if (string.IsNullOrEmpty(currentValue) || !canAccess)
{ {
if (location == AvatarLocation.Member) if (location == AvatarLocation.Member)
{ {