From 1dd86fdf91fc30fce7d6dfeed40f61b355b0a48c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 2 Feb 2023 21:15:36 -0500 Subject: [PATCH] Fix showing crosspost dupes. Fixes #900 (#912) --- 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 8a51f1c..72a5428 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) { -- 2.44.1