From 48e6fc3fc753f78154392ead5d8d613a6f1a2f9d Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Fri, 17 Mar 2023 14:08:08 +0100 Subject: [PATCH] Add support for Pleroma --- CHANGELOG.md | 1 + api/share.js | 7 ++++++- index.html | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 272575a..0113f96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ as to indicate that sharing to other federated networks is now possible. ### Added +- support for Pleroma - support for GNU Social - when developing, the API endpoint can now be tested locally thanks to [`vite-plugin-node`](https://github.com/axe-me/vite-plugin-node) diff --git a/api/share.js b/api/share.js index 8518baf..42af326 100644 --- a/api/share.js +++ b/api/share.js @@ -23,7 +23,7 @@ import https from "https"; const pathsMap = { mastodon: { - checkUrl: "/api/v1/instance", + checkUrl: "/api/v1/instance/rules", postUrl: "share", textParam: "text", }, @@ -32,6 +32,11 @@ const pathsMap = { postUrl: "/notice/new", textParam: "status_textarea", }, + pleroma: { + checkUrl: "/api/v1/pleroma/federation_status", + postUrl: "share", + textParam: "message", + }, }; const queryUrl = (url, service) => { diff --git a/index.html b/index.html index 154f200..7f79490 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@