0
Fork 0
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:
Michael Barrett 2024-10-29 17:07:01 +00:00 committed by GitHub
parent 4a8da45895
commit 28a9a431db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@tryghost/admin-x-activitypub",
"version": "0.3.3",
"version": "0.3.4",
"license": "MIT",
"repository": {
"type": "git",

View file

@ -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};