Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mentions are not persisted when ENABLE_NOTIFY_MAIL=false #14187

Closed
jpraet opened this issue Dec 29, 2020 · 3 comments · Fixed by #14218
Closed

mentions are not persisted when ENABLE_NOTIFY_MAIL=false #14187

jpraet opened this issue Dec 29, 2020 · 3 comments · Fixed by #14218
Labels

Comments

@jpraet
Copy link
Member

jpraet commented Dec 29, 2020

Gitea version (or commit ref): 1.14.0

Description

When ENABLE_NOTIFY_MAIL in app.ini is set to false, mentions in issues / pulls are not persisted (so not listed in the "Mentioning You" filter on the dashboard).

@lunny lunny added the type/bug label Jan 1, 2021
@zeripath
Copy link
Contributor

zeripath commented Jan 2, 2021

func mailParticipantsComment(ctx models.DBContext, c *models.Comment, opType models.ActionType, issue *models.Issue) (err error) {
rawMentions := references.FindAllMentionsMarkdown(c.Content)
userMentions, err := issue.ResolveMentionsByVisibility(ctx, c.Poster, rawMentions)
if err != nil {
return fmt.Errorf("ResolveMentionsByVisibility [%d]: %v", c.IssueID, err)
}
if err = models.UpdateIssueMentions(ctx, c.IssueID, userMentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", c.IssueID, err)
}

This logic does not belong in mail_comment.go

@jpraet
Copy link
Member Author

jpraet commented Jan 2, 2021

I'm working on a PR, combined with #14013.

@zeripath
Copy link
Contributor

zeripath commented Jan 2, 2021

I would not be at all surprised if that had the same root cause

jpraet added a commit to jpraet/gitea that referenced this issue Jan 2, 2021
extracted the issue mention handling from the mail notifier
6543 pushed a commit that referenced this issue Jan 2, 2021
…4218)

Fixes #14187: mention handling extracted from email notification code
Fixes #14013: add notification for mentions in pull request code comments
Fixes #13450: Not receiving any emails with setting "Only Email on Mention"
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants