- 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
@@ -40,6 +40,7 @@ namespace PrivaPub.Federation.Objects
|
||||
public IReadOnlyList<PostMedia> Attachments { get; init; } = Array.Empty<PostMedia>();
|
||||
public PostSource Source { get; init; }
|
||||
public PostPoll Poll { get; init; }
|
||||
public List<PostFlair> Flairs { get; init; } = new();
|
||||
public InteractionRule QuotePolicy { get; init; }
|
||||
public InteractionRule ReplyPolicy { get; init; }
|
||||
public InteractionRule LikePolicy { get; init; }
|
||||
@@ -119,6 +120,7 @@ namespace PrivaPub.Federation.Objects
|
||||
Attachments = Attachments(note),
|
||||
Source = ObjectShapes.Source(note),
|
||||
Poll = ObjectShapes.Poll(note),
|
||||
Flairs = ObjectShapes.Flairs(note["tag"]),
|
||||
QuotePolicy = ObjectShapes.QuotePolicy(note),
|
||||
ReplyPolicy = ObjectShapes.Policy(note, "canReply"),
|
||||
LikePolicy = ObjectShapes.Policy(note, "canLike"),
|
||||
|
||||
Reference in new issue
Block a user