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)
This commit is contained in:
parent
f61873c7e4
commit
e465ac854d
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
|
||||||
link := &feeds.Link{Href: act.GetCommentHTMLURL(ctx)}
|
link := &feeds.Link{Href: act.GetCommentHTMLURL(ctx)}
|
||||||
|
|
||||||
// title
|
// title
|
||||||
title = act.ActUser.DisplayName() + " "
|
title = act.ActUser.GetDisplayName() + " "
|
||||||
var titleExtra template.HTML
|
var titleExtra template.HTML
|
||||||
switch act.OpType {
|
switch act.OpType {
|
||||||
case activities_model.ActionCreateRepo:
|
case activities_model.ActionCreateRepo:
|
||||||
|
@ -260,7 +260,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
|
||||||
Description: desc,
|
Description: desc,
|
||||||
IsPermaLink: "false",
|
IsPermaLink: "false",
|
||||||
Author: &feeds.Author{
|
Author: &feeds.Author{
|
||||||
Name: act.ActUser.DisplayName(),
|
Name: act.ActUser.GetDisplayName(),
|
||||||
Email: act.ActUser.GetEmail(),
|
Email: act.ActUser.GetEmail(),
|
||||||
},
|
},
|
||||||
Id: fmt.Sprintf("%v: %v", strconv.FormatInt(act.ID, 10), link.Href),
|
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,
|
Link: link,
|
||||||
Created: rel.CreatedUnix.AsTime(),
|
Created: rel.CreatedUnix.AsTime(),
|
||||||
Author: &feeds.Author{
|
Author: &feeds.Author{
|
||||||
Name: rel.Publisher.DisplayName(),
|
Name: rel.Publisher.GetDisplayName(),
|
||||||
Email: rel.Publisher.GetEmail(),
|
Email: rel.Publisher.GetEmail(),
|
||||||
},
|
},
|
||||||
Id: fmt.Sprintf("%v: %v", strconv.FormatInt(rel.ID, 10), link.Href),
|
Id: fmt.Sprintf("%v: %v", strconv.FormatInt(rel.ID, 10), link.Href),
|
||||||
|
|
Loading…
Reference in a new issue