Skip to content

DEFAULT_SHOW_FULL_NAME is not respected in RSS feeds #31491

Closed
@na-Itms

Description

@na-Itms

Description

This is a follow-up on #20446 and #30096.

When the config option DEFAULT_SHOW_FULL_NAME is set to false, since Gitea 1.22, full names correctly don't appear anymore in commit lists. However, full names are still displayed in the RSS feed. We wish to use RSS feeds for our IRC notification bot and this introduces an unwanted discrepancy.

This can't be reproduced on the test instance, where DEFAULT_SHOW_FULL_NAME seems to be true.


If I'm not mistaken, this line

title = act.ActUser.DisplayName() + " "

should be

title = act.GetActDisplayName() + " "

in order for the code to access the config value.

I noticed there is also a GetActDisplayNameTitle method but the logic below

// GetActDisplayNameTitle gets the action's display name used for the title (tooltip) based on DEFAULT_SHOW_FULL_NAME
func (a *Action) GetActDisplayNameTitle(ctx context.Context) string {
if setting.UI.DefaultShowFullName {
return a.ShortActUserName(ctx)
}
return a.GetActFullName(ctx)
}

seems incorrect, unless I don't understand the aim of that method.

I read in #30096 (comment) that those code paths need a rewriting, in which case this issue could be used to track the task.


I am not confident enough in my understanding of the code to propose a PR yet, but I would be happy to contribute fixes. We would be very grateful to have a fix for the RSS feeds as soon as possible.

Thank you in advance.

Gitea Version

1.22

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04

How are you running Gitea?

Gitea 1.22 from binary download, run as a custom systemd service.

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions