Use community title and user display name for dropdown.

This commit is contained in:
Dessalines 2021-10-29 14:55:14 -04:00
parent ed37b30723
commit bfb43aae77

View file

@ -1465,13 +1465,12 @@ export const choicesConfig = {
export function communitySelectName(cv: CommunityView): string { export function communitySelectName(cv: CommunityView): string {
return cv.community.local return cv.community.local
? cv.community.title ? cv.community.title
: `${hostname(cv.community.actor_id)}/${cv.community.name}`; : `${hostname(cv.community.actor_id)}/${cv.community.title}`;
} }
export function personSelectName(pvs: PersonViewSafe): string { export function personSelectName(pvs: PersonViewSafe): string {
return pvs.person.local let pName = pvs.person.display_name || pvs.person.name;
? pvs.person.display_name || pvs.person.name return pvs.person.local ? pName : `${hostname(pvs.person.actor_id)}/${pName}`;
: `${hostname(pvs.person.actor_id)}/${pvs.person.name}`;
} }
export function initializeSite(site: GetSiteResponse) { export function initializeSite(site: GetSiteResponse) {