summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/filter.go
diff options
context:
space:
mode:
authorLibravatar Vyr Cossont <VyrCossont@users.noreply.github.com>2024-05-31 03:55:56 -0700
committerLibravatar GitHub <noreply@github.com>2024-05-31 12:55:56 +0200
commit61a8d362557c1787d534024ed2f14e999b785cc3 (patch)
treef0ace4432170c0c88afa3233c2c327c808b7b92d /internal/gtsmodel/filter.go
parent[chore] little startup tweaks (#2941) (diff)
downloadgotosocial-61a8d362557c1787d534024ed2f14e999b785cc3.tar.xz
[feature] Implement Filter API v2 (#2936)
* Use correct entity name * We support server-side filters now * Document filter v1 methods that can throw a 409 * Validate v1 filter phrase as filter title * Always check v1 filter API status codes in tests * Document keyword minimum requirement on filter API v1 * Make it possible to specify filter keyword update columns per filter keyword * Implement v2 filter API * Fix lint and tests * Update Swagger spec * Fix filter update test * Update Swagger spec *correctly* * Update actual files Swagger spec was generated from * Remove keywords_attributes and statuses_attributes * Add test for serialization of empty filter * More helpful messages when object is owned by wrong account
Diffstat (limited to 'internal/gtsmodel/filter.go')
-rw-r--r--internal/gtsmodel/filter.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/gtsmodel/filter.go b/internal/gtsmodel/filter.go
index c3feec00f..b1e8f5cac 100644
--- a/internal/gtsmodel/filter.go
+++ b/internal/gtsmodel/filter.go
@@ -81,6 +81,8 @@ type FilterStatus struct {
type FilterAction string
const (
+ // FilterActionNone filters should not exist, except internally, for partially constructed or invalid filters.
+ FilterActionNone FilterAction = ""
// FilterActionWarn means that the status should be shown behind a warning.
FilterActionWarn FilterAction = "warn"
// FilterActionHide means that the status should be removed from timeline results entirely.