aboutsummaryrefslogtreecommitdiffstats
path: root/entities/bug/op_edit_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'entities/bug/op_edit_comment.go')
-rw-r--r--entities/bug/op_edit_comment.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/entities/bug/op_edit_comment.go b/entities/bug/op_edit_comment.go
index b0897b0a..6ac09fd7 100644
--- a/entities/bug/op_edit_comment.go
+++ b/entities/bug/op_edit_comment.go
@@ -111,20 +111,20 @@ func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.I
}
// EditComment is a convenience function to apply the operation
-func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (*EditCommentOperation, error) {
+func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) {
op := NewEditCommentOp(author, unixTime, target, 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(), target), op, nil
}
// EditCreateComment is a convenience function to edit the body of a bug (the first comment)
-func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*EditCommentOperation, error) {
+func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) {
createOp := b.FirstOp().(*CreateOperation)
return EditComment(b, author, unixTime, createOp.Id(), message, files, metadata)
}