- A post's flairs are read in both dialects: Lemmy 1.0's CommunityPostTag (id, slug, name, description, colour slot) and PieFed's lemmy:CommunityTag (display name, text and background colours, whether to blur images). Colours are kept only as a colour slot or a hex value. - A community's own list comes from its `tag` and PieFed's older `lemmy:tagsForPosts`, and fills in a post that names only a flair's id and slug, as Lemmy's posts do. Edits and refreshes keep them current. - Clients get them as `privapub.flairs`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
1 parent
587997dd67
commit
d4b1788a4f
14 files changed
+172
-3
No files matched your search
@@ -46,6 +46,8 @@ namespace PrivaPub.Models.Post
|
||||
public PostPlace Place { get; set; }
|
||||
[BsonIgnoreIfNull]
|
||||
public PostPoll Poll { get; set; }
|
||||
[BsonIgnoreIfNull]
|
||||
public List<PostFlair> Flairs { get; set; }
|
||||
public List<float> Location { get; set; } = new();
|
||||
public float RangeKm { get; set; } = 5.0f;
|
||||
[BsonIgnoreIfNull]
|
||||
|
||||
@@ -38,6 +38,19 @@
|
||||
public List<string> Manual { get; set; } = new();
|
||||
}
|
||||
|
||||
// a community's label on a post (Lemmy 1.0's CommunityPostTag, PieFed's lemmy:CommunityTag): one of the community's own
|
||||
public class PostFlair
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Slug { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Color { get; set; }//Lemmy's colour slot, color01 to color10
|
||||
public string TextColor { get; set; }//PieFed's, as #rrggbb
|
||||
public string BackgroundColor { get; set; }
|
||||
public bool BlurImages { get; set; }
|
||||
}
|
||||
|
||||
public class PostSource
|
||||
{
|
||||
public string Content { get; set; }
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace PrivaPub.Models.User
|
||||
public string InboxURL { get; set; }
|
||||
public string OutboxURL { get; set; }
|
||||
public string FeaturedURL { get; set; }//featured: the posts it pins
|
||||
public List<PrivaPub.Models.Post.PostFlair> Flairs { get; set; } = new();//a community's labels for its posts
|
||||
public string ModeratorsURL { get; set; }//a community's attributedTo (Lemmy, PieFed, Mbin): the collection of its moderators
|
||||
public List<AssertionKey> AssertionKeys { get; set; } = new();//its Ed25519 keys (FEP-521a), which prove what it sends (FEP-8b32)
|
||||
public string WallURL { get; set; }//sm:wall (FEP-400e): where others write to it, Smithereen's walls
|
||||
|
||||
Reference in new issue
Block a user