mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
Merge branch 'feature/mastodon-api-for-tootstream' into 'develop'
mastodon api emulation improvements for tootstream Closes #101 See merge request pleroma/pleroma!100
This commit is contained in:
commit
9998b4519d
|
@ -102,13 +102,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
end
|
end
|
||||||
|
|
||||||
@instance Application.get_env(:pleroma, :instance)
|
@instance Application.get_env(:pleroma, :instance)
|
||||||
|
@mastodon_api_level "2.3.3"
|
||||||
|
|
||||||
def masto_instance(conn, _params) do
|
def masto_instance(conn, _params) do
|
||||||
response = %{
|
response = %{
|
||||||
uri: Web.base_url(),
|
uri: Web.base_url(),
|
||||||
title: Keyword.get(@instance, :name),
|
title: Keyword.get(@instance, :name),
|
||||||
description: "A Pleroma instance, an alternative fediverse server",
|
description: "A Pleroma instance, an alternative fediverse server",
|
||||||
version: Keyword.get(@instance, :version),
|
version: "#{@mastodon_api_level} (compatible; #{Keyword.get(@instance, :version)})",
|
||||||
email: Keyword.get(@instance, :email),
|
email: Keyword.get(@instance, :email),
|
||||||
urls: %{
|
urls: %{
|
||||||
streaming_api: String.replace(Web.base_url(), ["http", "https"], "wss")
|
streaming_api: String.replace(Web.base_url(), ["http", "https"], "wss")
|
||||||
|
|
|
@ -100,6 +100,7 @@ defmodule Pleroma.Web.Router do
|
||||||
get("/domain_blocks", MastodonAPIController, :empty_array)
|
get("/domain_blocks", MastodonAPIController, :empty_array)
|
||||||
get("/follow_requests", MastodonAPIController, :empty_array)
|
get("/follow_requests", MastodonAPIController, :empty_array)
|
||||||
get("/mutes", MastodonAPIController, :empty_array)
|
get("/mutes", MastodonAPIController, :empty_array)
|
||||||
|
get("/lists", MastodonAPIController, :empty_array)
|
||||||
|
|
||||||
get("/timelines/home", MastodonAPIController, :home_timeline)
|
get("/timelines/home", MastodonAPIController, :home_timeline)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue