mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Move most references to PKMember.Name to go through helper extepsions for privacy
This commit is contained in:
parent
761270f0c3
commit
56eae82b0a
22 changed files with 97 additions and 62 deletions
|
|
@ -279,6 +279,9 @@ namespace PluralKit.Bot
|
|||
public LookupContext LookupContextFor(SystemId systemId) =>
|
||||
System?.Id == systemId ? LookupContext.ByOwner : LookupContext.ByNonOwner;
|
||||
|
||||
public LookupContext LookupContextFor(PKMember target) =>
|
||||
System?.Id == target.System ? LookupContext.ByOwner : LookupContext.ByNonOwner;
|
||||
|
||||
public Context CheckSystemPrivacy(PKSystem target, PrivacyLevel level)
|
||||
{
|
||||
if (level.CanAccess(LookupContextFor(target))) return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue