Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated activities tab to use the activities endpoint in the activitypub app #21037

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Updated activities tab to use the activities endpoint in the activitypub app #21037

merged 1 commit into from
Sep 19, 2024

Conversation

mike182uk
Copy link
Member

refs AP-377, TryGhost/ActivityPub#43

Updated activities tab to use the activities endpoint in the activitypub app

return new URL(`.ghost/activitypub/outbox/${this.handle}`, this.apiUrl);
}

async getOutbox(): Promise<Activity[]> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need this as we can pass includeOwn when making a request to the activities endpoint

})
// API endpoint currently returns items oldest-newest, so reverse them
// to show the most recent activities first
.reverse();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Endpoint returns newest first

const siteUrl = useSiteUrl();
const api = createActivityPubAPI(handle, siteUrl);
return useQuery({
queryKey: [`activities:${handle}`],
queryKey: [`activities:${handle}:includeOwn=${includeOwn.toString()}`],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we have a better scheme for this 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now!

@mike182uk mike182uk merged commit a886d22 into TryGhost:main Sep 19, 2024
18 checks passed
@mike182uk mike182uk deleted the activitypub-notifications-use-activities-endpoint branch September 19, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants