aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_create.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/op_create.go')
-rw-r--r--bug/op_create.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/bug/op_create.go b/bug/op_create.go
index 0553137f..200da4ae 100644
--- a/bug/op_create.go
+++ b/bug/op_create.go
@@ -47,7 +47,9 @@ func (op *CreateOperation) Apply(snapshot *Snapshot) {
}
snapshot.Timeline = []TimelineItem{
- NewCreateTimelineItem(hash, comment),
+ &CreateTimelineItem{
+ CommentTimelineItem: NewCommentTimelineItem(hash, comment),
+ },
}
}
@@ -88,6 +90,11 @@ func NewCreateOp(author Person, unixTime int64, title, message string, files []g
}
}
+// CreateTimelineItem replace a Create operation in the Timeline and hold its edition history
+type CreateTimelineItem struct {
+ CommentTimelineItem
+}
+
// Convenience function to apply the operation
func Create(author Person, unixTime int64, title, message string) (*Bug, error) {
return CreateWithFiles(author, unixTime, title, message, nil)