From 9d12ff9f0bcc69123306d030744bd4dd2e4493c8 Mon Sep 17 00:00:00 2001 From: Alexander Simmerl Date: Tue, 6 Dec 2016 15:08:00 +0100 Subject: [PATCH] Raise tag limit for objects With the increased use of tags esp. for semantic distinction of posts the current limit turns out to be not sufficient when semantic tags are mixed with user input. There might be an opportunity to split those apart to avoid unnecessary side-effects. --- service/object/object.go | 2 +- service/object/object_test.go | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/service/object/object.go b/service/object/object.go index 8e96d99..cea76f2 100644 --- a/service/object/object.go +++ b/service/object/object.go @@ -175,7 +175,7 @@ func (o *Object) Validate() error { ) } - if len(o.Tags) > 5 { + if len(o.Tags) > 25 { return wrapError(ErrInvalidObject, "too many tags") } diff --git a/service/object/object_test.go b/service/object/object_test.go index f7e5d35..f913765 100644 --- a/service/object/object_test.go +++ b/service/object/object_test.go @@ -79,25 +79,6 @@ func TestObjectValidate(t *testing.T) { Type: "post", Visibility: VisibilityConnection, }, - // Too many Tags - { - OwnerID: 123, - Tags: []string{ - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - "tag", - }, - Type: "post", - Visibility: VisibilityConnection, - }, // Missing Type { OwnerID: 123,