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

Link mentioned user in markdown only if they are visible to viewer #21554

Merged
merged 9 commits into from
Oct 23, 2022
Prev Previous commit
Next Next commit
Update services/markup/processorhelper_test.go
  • Loading branch information
wxiaoguang committed Oct 23, 2022
commit 11de8be9d6e315a23f983770f0bf69fc943ee18e
2 changes: 1 addition & 1 deletion services/markup/processorhelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestProcessorHelper(t *testing.T) {
assert.False(t, ProcessorHelper().IsUsernameMentionable(context.Background(), userPrivate))
assert.False(t, ProcessorHelper().IsUsernameMentionable(context.Background(), userNoSuch))

// when using web context, use user's visibility to check
// when using web context, use user.IsUserVisibleToViewer to check
var err error
giteaCtx := &gitea_context.Context{}
giteaCtx.Req, err = http.NewRequest("GET", "/", nil)
Expand Down