diff --git a/packages/pl-api/lib/client.ts b/packages/pl-api/lib/client.ts index 1a7dfe840..223c13331 100644 --- a/packages/pl-api/lib/client.ts +++ b/packages/pl-api/lib/client.ts @@ -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); + } }, /** diff --git a/packages/pl-api/lib/features.ts b/packages/pl-api/lib/features.ts index a350e2136..2948e9935 100644 --- a/packages/pl-api/lib/features.ts +++ b/packages/pl-api/lib/features.ts @@ -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'), ]), diff --git a/packages/pl-api/package.json b/packages/pl-api/package.json index 3c3ffe0cd..439ca96a8 100644 --- a/packages/pl-api/package.json +++ b/packages/pl-api/package.json @@ -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": { diff --git a/packages/pl-fe/package.json b/packages/pl-fe/package.json index c6d69e351..30efdaee4 100644 --- a/packages/pl-fe/package.json +++ b/packages/pl-fe/package.json @@ -105,7 +105,7 @@ "multiselect-react-dropdown": "^2.0.25", "mutative": "^1.1.0", "path-browserify": "^1.0.1", - "pl-api": "^1.0.0-rc.74", + "pl-api": "^1.0.0-rc.75", "postcss": "^8.5.3", "process": "^0.11.10", "punycode": "^2.1.1", diff --git a/packages/pl-fe/yarn.lock b/packages/pl-fe/yarn.lock index 6afb8e113..d10927adb 100644 --- a/packages/pl-fe/yarn.lock +++ b/packages/pl-fe/yarn.lock @@ -6875,10 +6875,10 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pl-api@^1.0.0-rc.74: - version "1.0.0-rc.74" - resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.74.tgz#5a5cea799d6ce767c224ff3672c67f74070d224c" - integrity sha512-L8+xMgTldSPLxNnlrVhUzVn4grq2iyKFJt5I6SWy1R3pe2OsIlhaQvxQvo53RP3VtBDGLhrR6OYhi6bKshQeKA== +pl-api@^1.0.0-rc.75: + version "1.0.0-rc.75" + resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.75.tgz#ce01dfc60354d2e1dcdf8b8430c6018b9a28ee26" + integrity sha512-aiqSPsQ8HIa+SBs2gbAqNVcIhqSbz+DBlH9rfLHwzwpomEQ6BcRk10+VpdiGuQexXwcdz3rvp7BlRpugu+PIKw== dependencies: blurhash "^2.0.5" http-link-header "^1.1.3"