From: Ivan Tashkinov Date: Fri, 8 May 2020 18:37:55 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b2924ab1fbba4e6add15030cf8444d2d3f0cfe0c;p=akkoma Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding --- b2924ab1fbba4e6add15030cf8444d2d3f0cfe0c diff --cc config/config.exs index d698e6028,e703c1632..c51884f3a --- a/config/config.exs +++ b/config/config.exs @@@ -238,8 -238,21 +238,19 @@@ config :pleroma, :instance account_field_value_length: 2048, external_user_synchronization: true, extended_nickname_format: true, - cleanup_attachments: false + cleanup_attachments: false, + multi_factor_authentication: [ + totp: [ + # digits 6 or 8 + digits: 6, + period: 30 + ], + backup_codes: [ + number: 5, + length: 16 + ] + ] -config :pleroma, :extensions, output_relationships_in_statuses_by_default: true - config :pleroma, :feed, post_title: %{ max_length: 100, diff --cc lib/pleroma/web/admin_api/admin_api_controller.ex index e0e1a2ceb,9f1fd3aeb..d2c5a6b9c --- a/lib/pleroma/web/admin_api/admin_api_controller.ex +++ b/lib/pleroma/web/admin_api/admin_api_controller.ex @@@ -834,9 -830,19 +830,19 @@@ defmodule Pleroma.Web.AdminAPI.AdminAPI conn |> put_view(Pleroma.Web.AdminAPI.StatusView) - |> render("index.json", %{activities: activities, as: :activity, skip_relationships: false}) + |> render("index.json", %{activities: activities, as: :activity}) end + def status_show(conn, %{"id" => id}) do + with %Activity{} = activity <- Activity.get_by_id(id) do + conn + |> put_view(StatusView) + |> render("show.json", %{activity: activity}) + else + _ -> errors(conn, {:error, :not_found}) + end + end + def status_update(%{assigns: %{user: admin}} = conn, %{"id" => id} = params) do with {:ok, activity} <- CommonAPI.update_activity_scope(id, params) do {:ok, sensitive} = Ecto.Type.cast(:boolean, params["sensitive"])