feat: don't hide information from own system when directly requested

in lists, pk;m <ref> <prop>, etc
This commit is contained in:
spiral
2021-12-07 01:32:29 -05:00
parent 56e266190f
commit 9926bbbd8b
10 changed files with 38 additions and 31 deletions

View File

@@ -129,10 +129,12 @@ public class GroupMember
public async Task ListGroupMembers(Context ctx, PKGroup target)
{
var targetSystem = await GetGroupSystem(ctx, target);
ctx.CheckSystemPrivacy(targetSystem, target.ListPrivacy);
// see global system list for explanation of how privacy settings are used here
var opts = ctx.ParseMemberListOptions(ctx.LookupContextFor(target.System));
var targetSystem = await GetGroupSystem(ctx, target);
ctx.CheckSystemPrivacy(targetSystem.Id, target.ListPrivacy);
var opts = ctx.ParseMemberListOptions(ctx.DirectLookupContextFor(target.System));
opts.GroupFilter = target.Id;
var title = new StringBuilder($"Members of {target.DisplayName ?? target.Name} (`{target.Hid}`) in ");