From 7f2174d81160b1e61b2a69b008575df3b2475f4b Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Sat, 31 Mar 2018 19:14:47 +0200 Subject: Remove pl-dark-masto-fe, add preloading for common scripts --- lib/pleroma/web/templates/mastodon_api/mastodon/index.html.eex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/pleroma/web/templates/mastodon_api/mastodon/index.html.eex b/lib/pleroma/web/templates/mastodon_api/mastodon/index.html.eex index f96b15d64..6a00b9e2c 100644 --- a/lib/pleroma/web/templates/mastodon_api/mastodon/index.html.eex +++ b/lib/pleroma/web/templates/mastodon_api/mastodon/index.html.eex @@ -9,14 +9,17 @@ - + + + + - +
-- cgit v1.2.3 From 4bf86d4cf5b3641fb37013165442cb0f5e3ab591 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 31 Mar 2018 23:43:03 +0000 Subject: config: make the upload limit configurable --- lib/pleroma/web/endpoint.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 0a2ac853e..dde4e3ffe 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -34,7 +34,8 @@ defmodule Pleroma.Web.Endpoint do Plug.Parsers, parsers: [:urlencoded, :multipart, :json], pass: ["*/*"], - json_decoder: Jason + json_decoder: Jason, + length: Application.get_env(:pleroma, :instance) |> Keyword.get(:upload_limit) ) plug(Plug.MethodOverride) -- cgit v1.2.3 From 2dcc6037d038cdc187e850cc42b3863a5d449c91 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 1 Apr 2018 07:08:05 +0000 Subject: mastodon search api: implement a reasonable hashtags stub --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 58bb5e03a..dc92e30c5 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -513,12 +513,16 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do ) statuses = Repo.all(q) ++ fetched + tags = String.split(query) + |> Enum.uniq() + |> Enum.filter(fn tag -> String.starts_with?(tag, "#") end) + |> Enum.map(fn tag -> String.slice(tag, 1..-1) end) res = %{ "accounts" => AccountView.render("accounts.json", users: accounts, for: user, as: :user), "statuses" => StatusView.render("index.json", activities: statuses, for: user, as: :activity), - "hashtags" => [] + "hashtags" => tags } json(conn, res) -- cgit v1.2.3