From e465ac854d4c1edee87f0f7998f87c62d41d8dbf Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Thu, 25 Jul 2024 11:33:02 +0200 Subject: [PATCH] Use GetDisplayName() instead of DisplayName() to generate rss feeds (#31687) Fixes #31491 The RSS feed converted ignored the setting used in the application. (cherry picked from commit d8f82cbc780d09bb7ad074407a48480f0333b4b3) --- routers/web/feed/convert.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/web/feed/convert.go b/routers/web/feed/convert.go index 9ed57ec48c..0f4334692f 100644 --- a/routers/web/feed/convert.go +++ b/routers/web/feed/convert.go @@ -84,7 +84,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio link := &feeds.Link{Href: act.GetCommentHTMLURL(ctx)} // title - title = act.ActUser.DisplayName() + " " + title = act.ActUser.GetDisplayName() + " " var titleExtra template.HTML switch act.OpType { case activities_model.ActionCreateRepo: @@ -260,7 +260,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio Description: desc, IsPermaLink: "false", Author: &feeds.Author{ - Name: act.ActUser.DisplayName(), + Name: act.ActUser.GetDisplayName(), Email: act.ActUser.GetEmail(), }, Id: fmt.Sprintf("%v: %v", strconv.FormatInt(act.ID, 10), link.Href), @@ -320,7 +320,7 @@ func releasesToFeedItems(ctx *context.Context, releases []*repo_model.Release) ( Link: link, Created: rel.CreatedUnix.AsTime(), Author: &feeds.Author{ - Name: rel.Publisher.DisplayName(), + Name: rel.Publisher.GetDisplayName(), Email: rel.Publisher.GetEmail(), }, Id: fmt.Sprintf("%v: %v", strconv.FormatInt(rel.ID, 10), link.Href),