fix duration check

This commit is contained in:
Umputun
2018-01-03 23:30:29 -06:00
parent d57b86b590
commit 79196d13a0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func (s *Service) EditComment(locator Locator, commentID string, text string, ed
}
// edit allowed in editDuration window only
if comment.Timestamp.Add(editDuration).After(time.Now()) {
if comment.Timestamp.Add(editDuration).Before(time.Now()) {
return comment, errors.Errorf("too late to edit %s", commentID)
}