A persona's lists (PrivaPub's /api/v1/lists): made, renamed, given a replies policy and made exclusive on /lists, filled from the accounts it follows (accounts/search?following=true), and read as the feed's Lists tab. A followed account's profile has a Lists menu to put it in or take it out. ListService does the calls; the e2e tests check each step against PrivaPub's own answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace decePubClient.Models.Mastodon;
|
|
|
|
/// <summary>A persona's list of accounts it follows (Mastodon's List): read as its own feed, and when exclusive kept out of
|
|
/// the home feed. Lists are the persona's own; PrivaPub never federates them.</summary>
|
|
public class MastodonList
|
|
{
|
|
public string Id { get; set; }
|
|
public string Title { get; set; }
|
|
public ListRepliesPolicy RepliesPolicy { get; set; } = ListRepliesPolicy.List;
|
|
public bool Exclusive { get; set; }
|
|
}
|
|
|
|
/// <summary>Which replies a list's feed shows besides its members' replies to themselves and to the persona.</summary>
|
|
[JsonConverter(typeof(JsonStringEnumConverter<ListRepliesPolicy>))]
|
|
public enum ListRepliesPolicy
|
|
{
|
|
/// <summary>Replies to any account the persona follows.</summary>
|
|
[JsonStringEnumMemberName("followed")] Followed,
|
|
/// <summary>Replies to the list's members.</summary>
|
|
[JsonStringEnumMemberName("list")] List,
|
|
[JsonStringEnumMemberName("none")] None
|
|
}
|
|
|
|
public class ListAccountsForm
|
|
{
|
|
public List<string> AccountIds { get; set; } = [];
|
|
}
|