pl-api: support /api/v1/pleroma/outgoing_follow_requests

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-03-11 21:17:31 +01:00
parent 1c14c610bd
commit 798956fa5a
2 changed files with 13 additions and 0 deletions

View File

@ -897,6 +897,14 @@ class PlApiClient {
getFollowRequests: async (params?: GetFollowRequestsParams) =>
this.#paginatedGet('/api/v1/follow_requests', { params }, accountSchema),
/**
* View outgoing follow requests
*
* Requires features{@link Features['outgoingFollowRequests']}.
*/
getOutgoingFollowRequests: async (params?: GetFollowRequestsParams) =>
this.#paginatedGet('/api/v1/pleroma/outgoing_follow_requests', { params }, accountSchema),
/**
* Accept follow request
* @see {@link https://docs.joinmastodon.org/methods/follow_requests/#accept}

View File

@ -1011,6 +1011,11 @@ const getFeatures = (instance: Instance) => {
*/
notificationsRequestsAcceptMultiple: instance.api_versions.mastodon >= 1,
/**
* @see GET /api/v1/pleroma/outgoing_follow_requests
*/
outgoingFollowRequests: v.build === PL && gte(v.version, '2.8.0'),
pleromaAdminAccounts: v.software === PLEROMA,
/**