-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Updated activities tab to use the activities endpoint in the activitypub app #21037
Conversation
…pub app refs [AP-377](https://linear.app/tryghost/issue/AP-377/inbox-returning-33mb-of-data), [TryGhost/ActivityPub#43](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[]> { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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()}`], |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for now!
refs AP-377, TryGhost/ActivityPub#43
Updated activities tab to use the activities endpoint in the activitypub app