mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
feat: public/private lookup flags, consistency
This commit is contained in:
parent
aacf5909a9
commit
455830a2b5
16 changed files with 44 additions and 40 deletions
|
|
@ -48,13 +48,4 @@ public static class ContextPrivacyExt
|
|||
ctx.PopArgument();
|
||||
return subject;
|
||||
}
|
||||
|
||||
public static bool MatchPrivateFlag(this Context ctx, LookupContext pctx)
|
||||
{
|
||||
var privacy = true;
|
||||
if (ctx.MatchFlag("a", "all")) privacy = false;
|
||||
if (pctx == LookupContext.ByNonOwner && !privacy) throw Errors.LookupNotAllowed;
|
||||
|
||||
return privacy;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue