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

Fix mentionable users when writing issue comments (#32715)

Fix #32702
This commit is contained in:
wxiaoguang
2024-12-04 22:57:50 +08:00
committed by GitHub
parent 838653d1df
commit 4142397b0b
5 changed files with 19 additions and 15 deletions

View File

@@ -637,8 +637,12 @@ func attachmentsHTML(ctx *context.Context, attachments []*repo_model.Attachment,
return attachHTML
}
// get all teams that current user can mention
func handleTeamMentions(ctx *context.Context) {
// handleMentionableAssigneesAndTeams gets all teams that current user can mention, and fills the assignee users to the context data
func handleMentionableAssigneesAndTeams(ctx *context.Context, assignees []*user_model.User) {
// TODO: need to figure out how many places this is really used, and rename it to "MentionableAssignees"
// at the moment it is used on the issue list page, for the markdown editor mention
ctx.Data["Assignees"] = assignees
if ctx.Doer == nil || !ctx.Repo.Owner.IsOrganization() {
return
}