From 75653c51d7a36b12877bb6139503a05764bffa50 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 2 Feb 2023 20:33:55 -0500 Subject: [PATCH] Fix showing crosspost dupes. Fixes #900 --- src/shared/components/post/post.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index 4c44df70..8b2efffd 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -754,7 +754,7 @@ export class Post extends Component { } else if (op == UserOperation.Search) { let data = wsJsonToRes(msg); let xPosts = data.posts.filter( - p => p.post.id != Number(this.props.match.params.id) + p => p.post.ap_id != this.state.postRes?.post_view.post.ap_id ); this.setState({ crossPosts: xPosts.length > 0 ? xPosts : undefined }); } else if (op == UserOperation.LeaveAdmin) {