P7: community flairs, from Lemmy and PieFed
Build / Build (push) Successful in 8m2s

- 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:
thepraandClaude Opus 5.5 committed 2026-10-07 21:14:32 +02:00
1 parent 587997dd67
commit d4b1788a4f
14 files changed
+172 -3

No files matched your search

+13
View File
@@ -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; }