From 7d7b1f2475930f768ab4106489af8f41aa5b3a64 Mon Sep 17 00:00:00 2001 From: Owen Young Date: Fri, 29 Oct 2021 05:39:41 +0800 Subject: [PATCH 1/3] feat: post form community use title instead of name --- src/shared/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 594c5bc9..d1392f0e 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1462,7 +1462,7 @@ export const choicesConfig = { export function communitySelectName(cv: CommunityView): string { return cv.community.local - ? cv.community.name + ? cv.community.title : `${hostname(cv.community.actor_id)}/${cv.community.name}`; } From 96afee5b091362e87a543f3763caaa08be315ad3 Mon Sep 17 00:00:00 2001 From: Owen Young <62473795+theowenyoung@users.noreply.github.com> Date: Fri, 29 Oct 2021 11:53:14 +0800 Subject: [PATCH 2/3] ui: show user's display_name instead of username --- src/shared/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index d1392f0e..d8643c3f 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1468,7 +1468,7 @@ export function communitySelectName(cv: CommunityView): string { export function personSelectName(pvs: PersonViewSafe): string { return pvs.person.local - ? pvs.person.name + ? pvs.person.display_name : `${hostname(pvs.person.actor_id)}/${pvs.person.name}`; } From 0ef0ea7dfa5666296e2151676738f425f16d89c7 Mon Sep 17 00:00:00 2001 From: Owen Young Date: Fri, 29 Oct 2021 12:29:45 +0800 Subject: [PATCH 3/3] chore: in case display_name not exist --- src/shared/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index d8643c3f..a383b489 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1468,7 +1468,7 @@ export function communitySelectName(cv: CommunityView): string { export function personSelectName(pvs: PersonViewSafe): string { return pvs.person.local - ? pvs.person.display_name + ? pvs.person.display_name || pvs.person.name : `${hostname(pvs.person.actor_id)}/${pvs.person.name}`; }