···1919 }
2020}
21212222+func (ix *Indexer) NewIssueClosed(ctx context.Context, issue *models.Issue) {
2323+ l := log.FromContext(ctx).With("notifier", "indexer.NewIssueClosed", "issue", issue)
2424+ l.Debug("updating an issue")
2525+ err := ix.Issues.Index(ctx, *issue)
2626+ if err != nil {
2727+ l.Error("failed to index an issue", "err", err)
2828+ }
2929+}
3030+2231func (ix *Indexer) DeleteIssue(ctx context.Context, issue *models.Issue) {
2332 l := log.FromContext(ctx).With("notifier", "indexer.DeleteIssue", "issue", issue)
2433 l.Debug("deleting an issue")
+8
appview/issues/issues.go
···305305 rp.pages.Notice(w, "issue-action", "Failed to close issue. Try again later.")
306306 return
307307 }
308308+ // change the issue state (this will pass down to the notifiers)
309309+ issue.Open = false
308310309311 // notify about the issue closure
310312 rp.notifier.NewIssueClosed(r.Context(), issue)
···353355 rp.pages.Notice(w, "issue-action", "Failed to reopen issue. Try again later.")
354356 return
355357 }
358358+ // change the issue state (this will pass down to the notifiers)
359359+ issue.Open = true
360360+361361+ // // notify about the issue reopen
362362+ // rp.notifier.NewIssueReopen(r.Context(), issue)
363363+356364 rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))
357365 return
358366 } else {