1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

remove context from mail struct (#33811)

it can be passed by argument instead
This commit is contained in:
TheFox0x7
2025-03-06 21:57:00 +01:00
committed by GitHub
parent b0ee340969
commit e7cf62f2f7
4 changed files with 103 additions and 99 deletions

View File

@@ -25,9 +25,8 @@ func MailParticipantsComment(ctx context.Context, c *issues_model.Comment, opTyp
if c.Type == issues_model.CommentTypePullRequestPush {
content = ""
}
if err := mailIssueCommentToParticipants(
&mailCommentContext{
Context: ctx,
if err := mailIssueCommentToParticipants(ctx,
&mailComment{
Issue: issue,
Doer: c.Poster,
ActionType: opType,
@@ -48,9 +47,8 @@ func MailMentionsComment(ctx context.Context, pr *issues_model.PullRequest, c *i
visited := make(container.Set[int64], len(mentions)+1)
visited.Add(c.Poster.ID)
if err = mailIssueCommentBatch(
&mailCommentContext{
Context: ctx,
if err = mailIssueCommentBatch(ctx,
&mailComment{
Issue: pr.Issue,
Doer: c.Poster,
ActionType: activities_model.ActionCommentPull,