Skip to content

Commit d8f82cb

Browse files
authored
Use GetDisplayName() instead of DisplayName() to generate rss feeds (#31687)
Fixes #31491 The RSS feed converted ignored the setting used in the application.
1 parent 169031b commit d8f82cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

routers/web/feed/convert.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
8383
link := &feeds.Link{Href: act.GetCommentHTMLURL(ctx)}
8484

8585
// title
86-
title = act.ActUser.DisplayName() + " "
86+
title = act.ActUser.GetDisplayName() + " "
8787
var titleExtra template.HTML
8888
switch act.OpType {
8989
case activities_model.ActionCreateRepo:
@@ -252,7 +252,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
252252
Description: desc,
253253
IsPermaLink: "false",
254254
Author: &feeds.Author{
255-
Name: act.ActUser.DisplayName(),
255+
Name: act.ActUser.GetDisplayName(),
256256
Email: act.ActUser.GetEmail(),
257257
},
258258
Id: fmt.Sprintf("%v: %v", strconv.FormatInt(act.ID, 10), link.Href),
@@ -313,7 +313,7 @@ func releasesToFeedItems(ctx *context.Context, releases []*repo_model.Release) (
313313
Link: link,
314314
Created: rel.CreatedUnix.AsTime(),
315315
Author: &feeds.Author{
316-
Name: rel.Publisher.DisplayName(),
316+
Name: rel.Publisher.GetDisplayName(),
317317
Email: rel.Publisher.GetEmail(),
318318
},
319319
Id: fmt.Sprintf("%v: %v", strconv.FormatInt(rel.ID, 10), link.Href),

0 commit comments

Comments
 (0)