Use community title and user display name for dropdown.
authorDessalines <tyhou13@gmx.com>
Fri, 29 Oct 2021 18:55:14 +0000 (14:55 -0400)
committerDessalines <tyhou13@gmx.com>
Fri, 29 Oct 2021 18:55:14 +0000 (14:55 -0400)
src/shared/utils.ts

index 116729541ff33d57d756b1a6df499cac4e79cbba..92b42fb15ce8e1ad84dcbbe5379279550df6ebe4 100644 (file)
@@ -1465,13 +1465,12 @@ export const choicesConfig = {
 export function communitySelectName(cv: CommunityView): string {
   return cv.community.local
     ? 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 {
-  return pvs.person.local
-    ? pvs.person.display_name || pvs.person.name
-    : `${hostname(pvs.person.actor_id)}/${pvs.person.name}`;
+  let pName = pvs.person.display_name || pvs.person.name;
+  return pvs.person.local ? pName : `${hostname(pvs.person.actor_id)}/${pName}`;
 }
 
 export function initializeSite(site: GetSiteResponse) {