From 5a649d77515d10e7b81d0cbac98869f808c71298 Mon Sep 17 00:00:00 2001 From: Spectralitree Date: Mon, 24 May 2021 21:05:27 +0200 Subject: [PATCH 1/2] Fix looking up private group icons --- PluralKit.Bot/Commands/Groups.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluralKit.Bot/Commands/Groups.cs b/PluralKit.Bot/Commands/Groups.cs index 9ffb1900..0f051eb1 100644 --- a/PluralKit.Bot/Commands/Groups.cs +++ b/PluralKit.Bot/Commands/Groups.cs @@ -218,6 +218,8 @@ namespace PluralKit.Bot async Task ShowIcon() { + if (!target.IconPrivacy.CanAccess(ctx.LookupContextFor(target.System))) + throw Errors.LookupNotAllowed; if ((target.Icon?.Trim() ?? "").Length > 0) { var eb = new EmbedBuilder() From 06c0e05396c1c96b17f173c817464c7a7e0571fe Mon Sep 17 00:00:00 2001 From: Spectralitree Date: Mon, 24 May 2021 21:18:57 +0200 Subject: [PATCH 2/2] fix looking up private group descriptions --- PluralKit.Bot/Commands/Groups.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PluralKit.Bot/Commands/Groups.cs b/PluralKit.Bot/Commands/Groups.cs index 0f051eb1..d1c27ecb 100644 --- a/PluralKit.Bot/Commands/Groups.cs +++ b/PluralKit.Bot/Commands/Groups.cs @@ -153,6 +153,9 @@ namespace PluralKit.Bot } else if (!ctx.HasNext()) { + if (!target.DescriptionPrivacy.CanAccess(ctx.LookupContextFor(target.System))) + throw Errors.LookupNotAllowed; + if (target.Description == null) if (ctx.System?.Id == target.System) await ctx.Reply($"This group does not have a description set. To set one, type `pk;group {target.Reference()} description `.");