Settings, which held only the theme, now belong to the persona too: - its profile (update_credentials, a new PATCH in IHttpService): pictures, name, biography and fields as written, locked, bot, discoverable, indexable, and how its posts start (visibility, language, sensitive media, who may quote them); the composer starts at that visibility; - the root's personas, each used in turn, and a new one made; - the accounts it muted or blocked and the servers it blocked, each undone there, a server blocked from a pasted address or handle; - its follows, lists, blocks, mutes, blocked servers and bookmarks exported and imported as the CSV files Mastodon writes (PortabilityService): an import resolves each row through PrivaPub, one at a time, and can stop. Administration opens to moderators: reports, resolved there; and for administrators the servers blocked for everyone and the federation statistics (traffic by server, delivery success and latency, the crawler). The Direct tab pages conversations, badges the unread ones, and a card marks one read or takes it off the list; opening one reads it. A remote thread is read again 4 and 15 seconds after it opens, since PrivaPub then fetches the replies its servers hold. A thread its community locked shows a lock instead of a reply button, reactions stay visible below a content warning, and a searched handle opens its account's profile whatever else matched. The e2e tests cover each: the profile saved and read back, a persona made, servers blocked and imported, follows exported, an instance block and the statistics as the pasture's admin, a conversation read and removed, and a reply only Mastodon held appearing in its thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
93 lines
2.6 KiB
C#
93 lines
2.6 KiB
C#
namespace decePubClient.Models.Mastodon;
|
|
|
|
/// <summary>Status.privapub: what a Mastodon status cannot say (PrivaPub's Mastodon client API invariant 7).</summary>
|
|
public class PrivaPubStatus
|
|
{
|
|
/// <summary>The ActivityPub type of a remote object: Note, Article, Page, Video, Audio, Event, Question…</summary>
|
|
public string ObjectType { get; set; }
|
|
/// <summary>Its community's moderators locked it: PrivaPub refuses a reply.</summary>
|
|
public bool Locked { get; set; }
|
|
public string Title { get; set; }
|
|
public string Excerpt { get; set; }
|
|
public string Cover { get; set; }
|
|
public PrivaPubSource Source { get; set; }
|
|
public PrivaPubLink Link { get; set; }
|
|
public PrivaPubVideo Video { get; set; }
|
|
public PrivaPubAudio Audio { get; set; }
|
|
public PrivaPubEvent Event { get; set; }
|
|
/// <summary>A remote post's own place (Pixelfed's location), shown only.</summary>
|
|
public PrivaPubPlace Place { get; set; }
|
|
public PrivaPubVotes Votes { get; set; }
|
|
}
|
|
|
|
public class PrivaPubSource
|
|
{
|
|
public string Content { get; set; }
|
|
public string MediaType { get; set; }
|
|
}
|
|
|
|
public class PrivaPubLink
|
|
{
|
|
public string Url { get; set; }
|
|
public string Title { get; set; }
|
|
public string Description { get; set; }
|
|
public string Image { get; set; }
|
|
public bool FromPublisher { get; set; }
|
|
}
|
|
|
|
public class PrivaPubVariant
|
|
{
|
|
public string Url { get; set; }
|
|
public string MediaType { get; set; }
|
|
public int? Width { get; set; }
|
|
public int? Height { get; set; }
|
|
public double? Fps { get; set; }
|
|
public long? Size { get; set; }
|
|
}
|
|
|
|
public class PrivaPubVideo
|
|
{
|
|
public double? Duration { get; set; }
|
|
public List<PrivaPubVariant> Variants { get; set; } = [];
|
|
public bool IsLive { get; set; }
|
|
public long? Views { get; set; }
|
|
public string Licence { get; set; }
|
|
public string Category { get; set; }
|
|
}
|
|
|
|
public class PrivaPubAudio
|
|
{
|
|
public double? Duration { get; set; }
|
|
public List<PrivaPubVariant> Variants { get; set; } = [];
|
|
public string Album { get; set; }
|
|
public string Licence { get; set; }
|
|
}
|
|
|
|
public class PrivaPubEvent
|
|
{
|
|
public DateTime? Start { get; set; }
|
|
public DateTime? End { get; set; }
|
|
public string TimeZone { get; set; }
|
|
public List<PrivaPubPlace> Places { get; set; } = [];
|
|
public string OnlineUrl { get; set; }
|
|
public int? Participants { get; set; }
|
|
public int? Capacity { get; set; }
|
|
public string Status { get; set; }
|
|
}
|
|
|
|
public class PrivaPubPlace
|
|
{
|
|
public string Name { get; set; }
|
|
public string Address { get; set; }
|
|
public string Country { get; set; }
|
|
public double? Latitude { get; set; }
|
|
public double? Longitude { get; set; }
|
|
public string Url { get; set; }
|
|
}
|
|
|
|
public class PrivaPubVotes
|
|
{
|
|
public int Up { get; set; }
|
|
public int Down { get; set; }
|
|
}
|