Filters: made on /filters, applied by each card where it is
The persona's filters (PrivaPub's /api/v2/filters): made, given words and whole-word rules, contexts, an action and an expiry on /filters (linked from Settings), and deleted; posts filtered one by one can be taken out. Every status says which filters it matches; each page tells its cards where they are (home and lists, notifications, public feeds, the thread around the opened post, profiles), and a card leaves its post out (hide), folds it behind the filter's title with a way to show it anyway (warn), or blurs its media (blur). The e2e test folds and then hides a post of the persona's own. 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
e2491de16e
commit
9a752d9288
18 files changed
+1182
-240
No files matched your search
@@ -1,5 +1,3 @@
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
using decePubClient.E2E.Support;
|
||||
@@ -13,19 +11,8 @@ namespace decePubClient.E2E.Actions
|
||||
// answer to the persona's token, so the page and the server agree on the list, its members and its posts.
|
||||
public sealed class ListTests(Browser browser)
|
||||
{
|
||||
static async Task<JsonNode> Api(Pasture.Persona persona, string path, HttpMethod method = null, JsonObject body = null)
|
||||
{
|
||||
using var http = Pasture.Http();
|
||||
using var request = new HttpRequestMessage(method ?? HttpMethod.Get, Pasture.Api + path);
|
||||
if (body is not null)
|
||||
request.Content = new StringContent(body.ToJsonString(), System.Text.Encoding.UTF8, "application/json");
|
||||
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", persona.Token);
|
||||
using var response = await http.SendAsync(request);
|
||||
if (response.StatusCode == HttpStatusCode.NotFound)
|
||||
return null;
|
||||
response.EnsureSuccessStatusCode();
|
||||
return JsonNode.Parse(await response.Content.ReadAsStringAsync());
|
||||
}
|
||||
static Task<JsonNode> Api(Pasture.Persona persona, string path, HttpMethod method = null, JsonObject body = null) =>
|
||||
PersonaApi.Call(persona, path, method, body);
|
||||
|
||||
// an account the persona follows that has written something
|
||||
static async Task<JsonNode> Followed(Pasture.Persona persona) =>
|
||||
|
||||
Reference in new issue
Block a user