From c98a108ee3f15136d3bf893054259130aaf6f2fa Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 16 Nov 2020 16:19:10 -0600 Subject: [PATCH] fixing federated community / cross-post display links. Fixes #75 --- src/shared/components/post-listing.tsx | 8 +++++++- src/shared/components/user.tsx | 25 +++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 6545b2a..809b8d1 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -617,7 +617,13 @@ export class PostListing extends Component { {this.props.post.duplicates.map(post => (
  • - {post.community_name} + + {post.community_local + ? post.community_name + : `${post.community_name}@${hostname( + post.community_actor_id + )}`} +
  • ))} diff --git a/src/shared/components/user.tsx b/src/shared/components/user.tsx index 3c50adf..8f593cc 100644 --- a/src/shared/components/user.tsx +++ b/src/shared/components/user.tsx @@ -55,6 +55,7 @@ import { UserDetails } from './user-details'; import { MarkdownTextArea } from './markdown-textarea'; import { ImageUploadForm } from './image-upload-form'; import { BannerIconHeader } from './banner-icon-header'; +import { CommunityLink } from './community-link'; interface UserState { userRes: UserDetailsResponse; @@ -841,9 +842,15 @@ export class User extends Component {
      {this.state.userRes.moderates.map(community => (
    • - - {community.community_name} - +
    • ))}
    @@ -864,9 +871,15 @@ export class User extends Component {
      {this.state.userRes.follows.map(community => (
    • - - {community.community_name} - +
    • ))}
    -- 2.44.1