R8 the Mastodon API made real in decePub: featured tags, notify, languages, recommendations, notes, suggestions, the direct stream
A profile shows the hashtags an account features as chips opening their feed; under another account's header is what the persona keeps of it for itself alone: for one it follows, a bell (follow with notify), the languages of its posts that reach the home feed (follow with languages[]) and Recommend (endorsements, private here), and for any account a private note saved on blur or with Save. Settings edits the persona's featured hashtags (added by name or from those used lately, 10 at most) and its reading preferences (/clientapi/avatar/private/preferences), which CascadingState keeps per persona and the card applies to sensitive media and content warnings. A hashtag's tab features it on the profile. Explore has Who to follow (/api/v2/suggestions, dismissed for good after asking); Administration has Staff picks. The Direct tab follows the direct stream's conversation events; status notifications show the post. The follows CSV carries notify and languages. Verified: Release build, 0 errors (the 3 warnings were there before). Not run against PrivaPub or in the pasture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
This commit is contained in:
1 parent
566b0e33ea
commit
d33697e3fc
28 files changed
+1784
-52
No files matched your search
@@ -12,9 +12,11 @@ namespace decePubClient.Services
|
||||
/// <summary>One stream of PrivaPub's streaming API: its name and, for a hashtag or a list, which one.</summary>
|
||||
public sealed record StreamSubscription(string Stream, string Tag = default, string List = default);
|
||||
|
||||
/// <summary>What a stream told: the stream it came on, the event (update, notification, status.update, delete) and
|
||||
/// what it is about (a Status or a Notification for those, the deleted id for delete).</summary>
|
||||
public sealed record StreamMessage(string Event, Status Status = default, Notification Notification = default, string DeletedId = default);
|
||||
/// <summary>What a stream told: the event (update, notification, status.update, delete, and on the direct stream
|
||||
/// conversation) and what it is about (a Status, a Notification or a Conversation for those, the deleted id for
|
||||
/// delete).</summary>
|
||||
public sealed record StreamMessage(string Event, Status Status = default, Notification Notification = default, string DeletedId = default,
|
||||
Conversation Conversation = default);
|
||||
|
||||
/// <summary>What the user stream told of the administrators' announcements: one new or changed (announcement), one
|
||||
/// gone (announcement.delete, its id), or a reaction's count now (announcement.reaction).</summary>
|
||||
@@ -215,6 +217,8 @@ namespace decePubClient.Services
|
||||
{
|
||||
"update" or "status.update" => new StreamMessage(name, Status: JsonSerializer.Deserialize<Status>(payload, SUtility.MastodonSerializer)),
|
||||
"notification" => new StreamMessage(name, Notification: JsonSerializer.Deserialize<Notification>(payload, SUtility.MastodonSerializer)),
|
||||
// a direct conversation with a new message, as /api/v1/conversations lists it (the direct stream)
|
||||
"conversation" => new StreamMessage(name, Conversation: JsonSerializer.Deserialize<Conversation>(payload, SUtility.MastodonSerializer)),
|
||||
"delete" => new StreamMessage(name, DeletedId: payload),
|
||||
_ => null
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user