mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 13:57:54 +00:00
feat!: separate banner privacy from description privacy
This commit is contained in:
parent
0c802ab0bd
commit
a0f13b47af
15 changed files with 100 additions and 9 deletions
|
|
@ -51,6 +51,7 @@ public class PKGroup
|
|||
|
||||
public PrivacyLevel NamePrivacy { get; private set; }
|
||||
public PrivacyLevel DescriptionPrivacy { get; private set; }
|
||||
public PrivacyLevel BannerPrivacy { get; private set; }
|
||||
public PrivacyLevel IconPrivacy { get; private set; }
|
||||
public PrivacyLevel ListPrivacy { get; private set; }
|
||||
public PrivacyLevel MetadataPrivacy { get; private set; }
|
||||
|
|
@ -88,7 +89,7 @@ public static class PKGroupExt
|
|||
o.Add("display_name", group.NamePrivacy.CanAccess(ctx) ? group.DisplayName : null);
|
||||
o.Add("description", group.DescriptionPrivacy.Get(ctx, group.Description));
|
||||
o.Add("icon", group.IconFor(ctx));
|
||||
o.Add("banner", group.DescriptionPrivacy.Get(ctx, group.BannerImage));
|
||||
o.Add("banner", group.BannerPrivacy.Get(ctx, group.BannerImage));
|
||||
o.Add("color", group.Color);
|
||||
|
||||
o.Add("created", group.CreatedFor(ctx)?.FormatExport());
|
||||
|
|
@ -102,6 +103,7 @@ public static class PKGroupExt
|
|||
|
||||
p.Add("name_privacy", group.NamePrivacy.ToJsonString());
|
||||
p.Add("description_privacy", group.DescriptionPrivacy.ToJsonString());
|
||||
p.Add("banner_privacy", group.BannerPrivacy.ToJsonString());
|
||||
p.Add("icon_privacy", group.IconPrivacy.ToJsonString());
|
||||
p.Add("list_privacy", group.ListPrivacy.ToJsonString());
|
||||
p.Add("metadata_privacy", group.MetadataPrivacy.ToJsonString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue