Pinned posts on profiles, and pinning from the card
A profile shows the posts the account pins above its posts (pinned=true: for an account elsewhere, what it features, which PrivaPub now keeps); the persona pins and unpins its own public and unlisted posts from the card's menu, and PrivaPub tells its followers. tests/e2e/Actions/PinTests.cs pins from the card and finds the post first on the profile; the whole e2e suite passes against the reseeded village (122, 4 skipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
a5178a67b1
commit
da98addf76
8 files changed
+119
-3
No files matched your search
@@ -144,6 +144,17 @@ namespace decePubClient.Services
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>The posts the account pins, in its order: what it features, for an account elsewhere.</summary>
|
||||
public async Task<List<FeedPost>> Pinned(string accountId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var response = await httpService.Get(APIs.Mastodon.GET_M_AccountStatuses(accountId), ["pinned=true"], cancellationToken: cancellationToken);
|
||||
if (response.IsSuccessStatusCode)
|
||||
return [.. (await response.MastodonReadFromJsonAsync<List<Status>>(cancellationToken) ?? []).Select(FeedPost.Of)];
|
||||
|
||||
await LogFailure(response, nameof(Pinned), cancellationToken);
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <summary>The accounts waiting for the persona to accept their follow.</summary>
|
||||
public async Task<List<Account>> FollowRequests(CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,9 @@ namespace decePubClient.Services
|
||||
Reblog,
|
||||
Unreblog,
|
||||
Bookmark,
|
||||
Unbookmark
|
||||
Unbookmark,
|
||||
Pin,
|
||||
Unpin
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user