aboutsummaryrefslogtreecommitdiffstats
path: root/entities/bug/op_add_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'entities/bug/op_add_comment.go')
-rw-r--r--entities/bug/op_add_comment.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/entities/bug/op_add_comment.go b/entities/bug/op_add_comment.go
index b049ef16..5edef9d0 100644
--- a/entities/bug/op_add_comment.go
+++ b/entities/bug/op_add_comment.go
@@ -83,14 +83,14 @@ type AddCommentTimelineItem struct {
func (a *AddCommentTimelineItem) IsAuthored() {}
// AddComment is a convenience function to add a comment to a bug
-func AddComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*AddCommentOperation, error) {
+func AddComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *AddCommentOperation, error) {
op := NewAddCommentOp(author, unixTime, message, files)
for key, val := range metadata {
op.SetMetadata(key, val)
}
if err := op.Validate(); err != nil {
- return nil, err
+ return entity.UnsetCombinedId, nil, err
}
b.Append(op)
- return op, nil
+ return entity.CombineIds(b.Id(), op.Id()), op, nil
}