Mastodon's lists replace the empty stubs: CRUD, members (only accounts the persona follows; a follow that ends takes its memberships with it), accounts/:id/lists, and timelines/list/:id from the persona's home entries with the replies policy (followed, list, none; self-replies and replies to the persona always). An exclusive list's members stay out of home. Lists never federate, and go with a deleted persona. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using MongoDB.Entities;
|
|
|
|
namespace PrivaPub.Models.Social
|
|
{
|
|
//a persona's list of accounts it follows (Mastodon lists): a timeline of their posts, and, when exclusive, their posts
|
|
//kept out of the home timeline. Lists are the persona's own and never federate.
|
|
public class PersonaList : Entity
|
|
{
|
|
public string AvatarId { get; set; }
|
|
public string Title { get; set; }
|
|
public string RepliesPolicy { get; set; } = ListRepliesPolicy.List;
|
|
public bool Exclusive { get; set; }
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|
|
|
|
public class PersonaListMember : Entity
|
|
{
|
|
public string ListId { get; set; }
|
|
public string AvatarId { get; set; }//the list's owner
|
|
public string AccountId { get; set; }//the member: a ForeignAvatar.ID, an Avatar.ID or a community's Group.ID
|
|
public DateTime AddedAt { get; set; } = DateTime.UtcNow;
|
|
}
|
|
|
|
public static class ListRepliesPolicy
|
|
{
|
|
public const string Followed = "followed";//replies to anyone the persona follows
|
|
public const string List = "list";//replies to members of the list
|
|
public const string None = "none";
|
|
|
|
public static bool IsValid(string value) => value is Followed or List or None;
|
|
}
|
|
}
|