From 45f4afe60e29e147e3adfaa4d7b66ca58e22b1de Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Mon, 6 May 2024 04:49:08 -0700 Subject: feature: filters v2 server-side warning/hiding (#2793) * Remove dead code * Filter statuses when converting to frontend representation * status.filtered is an array * Make matching case-insensitive * Remove TODOs that don't need to be done now * Add missing filter check for notification * lint: rename ErrHideStatus * APIFilterActionToFilterAction not used yet * swaggerino docseroni * Address review comments * Add apimodel.FilterActionNone --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com> Co-authored-by: tobi --- internal/api/model/status.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/api/model/status.go') diff --git a/internal/api/model/status.go b/internal/api/model/status.go index 9543303eb..9098cb59d 100644 --- a/internal/api/model/status.go +++ b/internal/api/model/status.go @@ -100,6 +100,8 @@ type Status struct { // so the user may redraft from the source text without the client having to reverse-engineer // the original text from the HTML content. Text string `json:"text,omitempty"` + // A list of filters that matched this status and why they matched, if there are any such filters. + Filtered []FilterResult `json:"filtered,omitempty"` // Additional fields not exposed via JSON // (used only internally for templating etc). -- cgit v1.2.3