| 23 | } |
| 24 | |
| 25 | func NewBugCache(b *bug.Bug, repo repository.ClockedRepo, getUserIdentity getUserIdentityFunc, entityUpdated func(id entity.Id) error) *BugCache { |
| 26 | return &BugCache{ |
| 27 | CachedEntityBase: CachedEntityBase[*bug.Snapshot, bug.Operation]{ |
| 28 | repo: repo, |
| 29 | entityUpdated: entityUpdated, |
| 30 | getUserIdentity: getUserIdentity, |
| 31 | entity: &withSnapshot[*bug.Snapshot, bug.Operation]{Interface: b}, |
| 32 | }, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | func (c *BugCache) AddComment(message string) (entity.CombinedId, *bug.AddCommentOperation, error) { |
| 37 | return c.AddCommentWithFiles(message, nil) |