refactor(participants): use DisplayName in JoinCredited

This commit is contained in:
Deluan 2026-05-24 20:09:04 -03:00
parent 57785255bf
commit 7d601029c9

View File

@ -100,10 +100,7 @@ func (p ParticipantList) Join(sep string) string {
// Falls back to Name when CreditedAs is empty.
func (p ParticipantList) JoinCredited(sep string) string {
return strings.Join(slice.Map(p, func(part Participant) string {
n := part.CreditedAs
if n == "" {
n = part.Name
}
n := part.DisplayName()
if part.SubRole != "" {
return n + " (" + part.SubRole + ")"
}