mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix(bot): respect member/group name/desc privacy in search
This commit is contained in:
parent
42235cef9c
commit
5f644ab17a
8 changed files with 42 additions and 12 deletions
|
|
@ -54,7 +54,7 @@ public class GroupMember
|
|||
public async Task ListMemberGroups(Context ctx, PKMember target)
|
||||
{
|
||||
var targetSystem = await ctx.Repository.GetSystem(target.System);
|
||||
var opts = ctx.ParseListOptions(ctx.DirectLookupContextFor(target.System));
|
||||
var opts = ctx.ParseListOptions(ctx.DirectLookupContextFor(target.System), ctx.LookupContextFor(target.System));
|
||||
opts.MemberFilter = target.Id;
|
||||
|
||||
var title = new StringBuilder($"Groups containing {target.Name} (`{target.DisplayHid(ctx.Config)}`) in ");
|
||||
|
|
@ -141,7 +141,7 @@ public class GroupMember
|
|||
var targetSystem = await GetGroupSystem(ctx, target);
|
||||
ctx.CheckSystemPrivacy(targetSystem.Id, target.ListPrivacy);
|
||||
|
||||
var opts = ctx.ParseListOptions(ctx.DirectLookupContextFor(target.System));
|
||||
var opts = ctx.ParseListOptions(ctx.DirectLookupContextFor(target.System), ctx.LookupContextFor(target.System));
|
||||
opts.GroupFilter = target.Id;
|
||||
|
||||
var title = new StringBuilder($"Members of {target.DisplayName ?? target.Name} (`{target.DisplayHid(ctx.Config)}`) in ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue