Files
decePubClient/Models/Mastodon/MastodonList.cs
T

29 lines
1.0 KiB
C#
Raw Normal View History

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; } = [];
}