The composer completes mentions and hashtags
A mention or hashtag being written at the end of the words is offered, once typing pauses, the accounts or tags PrivaPub already knows (/api/v2/search, never resolving); a click writes it out. e2e: a town persona's handle, begun, is offered and completed. CLAUDE.md also says that FEP-5624's moderated comments (PeerTube) show as pending on a card, as GoToSocial's policies do. 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
658683f816
commit
511edf3591
4 files changed
+102
-4
No files matched your search
@@ -193,6 +193,20 @@ namespace decePubClient.Services
|
||||
return new SearchResults();
|
||||
}
|
||||
|
||||
/// <summary>Accounts or hashtags this server already knows that match what is being typed, for the composer: nothing
|
||||
/// is fetched from elsewhere.</summary>
|
||||
public async Task<SearchResults> Suggest(string typed, bool hashtags, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var response = await httpService.Get(APIs.Mastodon.GET_Search,
|
||||
[$"q={Uri.EscapeDataString(typed)}", $"type={(hashtags ? "hashtags" : "accounts")}", "resolve=false", "limit=5"],
|
||||
cancellationToken: cancellationToken);
|
||||
if (response.IsSuccessStatusCode)
|
||||
return await response.MastodonReadFromJsonAsync<SearchResults>(cancellationToken) ?? new SearchResults();
|
||||
|
||||
await LogFailure(response, nameof(Suggest), cancellationToken);
|
||||
return new SearchResults();
|
||||
}
|
||||
|
||||
/// <summary>Saves the persona's profile; Data is its account as PrivaPub now describes it (with its Source).</summary>
|
||||
public async Task<WebResult> UpdateProfile(ProfileForm form, CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user