Add member avatar privacy

This commit is contained in:
Ske
2020-06-20 16:00:50 +02:00
parent 27c8100cac
commit ae4e8f97d0
13 changed files with 61 additions and 14 deletions

View File

@@ -4,5 +4,8 @@
{
public static string NameFor(this PKMember member, LookupContext ctx) =>
member.NamePrivacy.CanAccess(ctx) ? member.Name : member.DisplayName ?? member.Name;
public static string AvatarFor(this PKMember member, LookupContext ctx) =>
member.AvatarPrivacy.CanAccess(ctx) ? member.AvatarUrl : null;
}
}

View File

@@ -25,6 +25,7 @@ namespace PluralKit.Core {
public PrivacyLevel MemberVisibility { get; set; }
public PrivacyLevel DescriptionPrivacy { get; set; }
public PrivacyLevel AvatarPrivacy { get; set; }
public PrivacyLevel NamePrivacy { get; set; } //ignore setting if no display name is set
public PrivacyLevel BirthdayPrivacy { get; set; }
public PrivacyLevel PronounPrivacy { get; set; }