Fix context usage (#33554) (#33557)

Backport #33554
This commit is contained in:
wxiaoguang 2025-02-11 19:46:27 +08:00 committed by GitHub
parent 7794ff0874
commit 8fa3925874
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 10 deletions

View file

@ -20,8 +20,8 @@ func ProcessorHelper() *markup.RenderHelperFuncs {
return false
}
giteaCtx, ok := ctx.(*gitea_context.Context)
if !ok {
giteaCtx := gitea_context.GetWebContext(ctx)
if giteaCtx == nil {
// when using general context, use user's visibility to check
return mentionedUser.Visibility.IsPublic()
}