pl-api: support outgoing follow requests in upcoming gotosocial release
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -1027,7 +1027,14 @@ class PlApiClient {
|
||||
(response: Array<{ user: {id: string } }>) => response.map(({ user }) => user.id),
|
||||
);
|
||||
}
|
||||
return this.#paginatedGet('/api/v1/pleroma/outgoing_follow_requests', { params }, accountSchema);
|
||||
|
||||
switch (this.features.version.software) {
|
||||
case GOTOSOCIAL:
|
||||
return this.#paginatedGet('/api/v1/follow_requests/outgoing', { params }, accountSchema);
|
||||
|
||||
default:
|
||||
return this.#paginatedGet('/api/v1/pleroma/outgoing_follow_requests', { params }, accountSchema);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -1253,9 +1253,12 @@ const getFeatures = (instance: Instance) => {
|
||||
notificationsRequestsAcceptMultiple: instance.api_versions.mastodon >= 1,
|
||||
|
||||
/**
|
||||
* @see GET api/iceshrimp/follow_requests/outgoing
|
||||
* @see GET /api/v1/follow_requests/outgoing
|
||||
* @see GET /api/v1/pleroma/outgoing_follow_requests
|
||||
*/
|
||||
outgoingFollowRequests: any([
|
||||
v.software === GOTOSOCIAL && gte(v.version, '0.20.0'),
|
||||
v.software === ICESHRIMP_NET,
|
||||
v.build === PL && gte(v.version, '2.8.0'),
|
||||
]),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pl-api",
|
||||
"version": "1.0.0-rc.74",
|
||||
"version": "1.0.0-rc.75",
|
||||
"type": "module",
|
||||
"homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user