Do not display account suggestion dismiss button if not supported
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -861,7 +861,7 @@ class PlApiClient {
|
||||
* Remove a suggestion
|
||||
* Remove an account from follow suggestions.
|
||||
*
|
||||
* Requires features{@link Features['suggestions']}.
|
||||
* Requires features{@link Features['suggestionsDismiss']}.
|
||||
* @see {@link https://docs.joinmastodon.org/methods/suggestions/#remove}
|
||||
*/
|
||||
dismissSuggestions: async (accountId: string) => {
|
||||
|
||||
@@ -1085,6 +1085,14 @@ const getFeatures = (instance?: Instance) => {
|
||||
features.includes('v2_suggestions'),
|
||||
]),
|
||||
|
||||
/**
|
||||
* Remove an account from follow suggestions
|
||||
* @see DELETE /api/v1/suggestions/:account_id
|
||||
*/
|
||||
suggestionsDismiss: any([
|
||||
v.software === MASTODON,
|
||||
]),
|
||||
|
||||
/**
|
||||
* Supports V2 suggested accounts.
|
||||
* @see GET /api/v2/suggestions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pl-api",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.29",
|
||||
"type": "module",
|
||||
"homepage": "https://github.com/mkljczk/pl-fe/tree/fork/packages/pl-api",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user