diff --git a/app/store/service/service.go b/app/store/service/service.go index 134c94af..794f7bd2 100644 --- a/app/store/service/service.go +++ b/app/store/service/service.go @@ -104,10 +104,6 @@ func (s *DataStore) EditComment(locator store.Locator, commentID string, req Edi if err != nil { return comment, err } - // edit allowed only once - if comment.Edit != nil { - return comment, errors.Errorf("comment %s already edited at %s", commentID, comment.Edit.Timestamp) - } // edit allowed in editDuration window only if s.EditDuration > 0 && time.Now().After(comment.Timestamp.Add(s.EditDuration)) { diff --git a/app/store/service/service_test.go b/app/store/service/service_test.go index 66809dfa..1005304b 100644 --- a/app/store/service/service_test.go +++ b/app/store/service/service_test.go @@ -158,7 +158,7 @@ func TestService_EditComment(t *testing.T) { _, err = b.EditComment(store.Locator{URL: "https://radio-t.com", SiteID: "radio-t"}, res[0].ID, EditRequest{Orig: "yyy", Text: "xxx", Summary: "my edit"}) - assert.NotNil(t, err, "allow edit once") + assert.Nil(t, err, "allow second edit") } func TestService_EditCommentDurationFailed(t *testing.T) {