mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Prevent replies from being shown on profile page in admin-x-activitypub (#21454)
refs [AP-543](https://linear.app/ghost/issue/AP-543/posts-on-profile-should-not-include-replies) Filtered the posts on the profile page to only show `Create` activities that are not replies.
This commit is contained in:
parent
4a8da45895
commit
28a9a431db
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tryghost/admin-x-activitypub",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -28,7 +28,9 @@ const Profile: React.FC<ProfileProps> = ({}) => {
|
|||
const {data: following = []} = useFollowingForUser('index');
|
||||
const {data: followers = []} = useFollowersForUser('index');
|
||||
const {data: liked = []} = useLikedForUser('index');
|
||||
const {data: posts = []} = useOutboxForUser('index');
|
||||
const {data: outboxPosts = []} = useOutboxForUser('index');
|
||||
|
||||
const posts = outboxPosts.filter(post => post.type === 'Create' && !post.object.inReplyTo);
|
||||
|
||||
// Replace 'index' with the actual handle of the user
|
||||
const {data: userProfile} = useUserDataForUser('index') as {data: ActorProperties | null};
|
||||
|
|
Loading…
Add table
Reference in a new issue