Fix showing crosspost dupes. Fixes #900

This commit is contained in:
Dessalines 2023-02-02 20:33:55 -05:00
parent 87c30705ef
commit 75653c51d7

View file

@ -754,7 +754,7 @@ export class Post extends Component<any, PostState> {
} else if (op == UserOperation.Search) {
let data = wsJsonToRes<SearchResponse>(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) {