mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 08:10:10 +00:00
feat: don't hide information from own system when directly requested
in lists, pk;m <ref> <prop>, etc
This commit is contained in:
parent
56e266190f
commit
9926bbbd8b
10 changed files with 38 additions and 31 deletions
|
|
@ -9,9 +9,13 @@ public class SystemList
|
|||
public async Task MemberList(Context ctx, PKSystem target)
|
||||
{
|
||||
if (target == null) throw Errors.NoSystemError;
|
||||
ctx.CheckSystemPrivacy(target, target.MemberListPrivacy);
|
||||
ctx.CheckSystemPrivacy(target.Id, target.MemberListPrivacy);
|
||||
|
||||
var opts = ctx.ParseMemberListOptions(ctx.LookupContextFor(target.Id));
|
||||
// explanation of privacy lookup here:
|
||||
// - ParseMemberListOptions checks list access privacy and sets the privacy filter (which members show up in list)
|
||||
// - RenderMemberList checks the indivual privacy for each member (NameFor, etc)
|
||||
// the own system is always allowed to look up their list
|
||||
var opts = ctx.ParseMemberListOptions(ctx.DirectLookupContextFor(target.Id));
|
||||
await ctx.RenderMemberList(
|
||||
ctx.LookupContextFor(target.Id),
|
||||
target.Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue