Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
authorIvan Tashkinov <ivantashkinov@gmail.com>
Fri, 8 May 2020 18:37:55 +0000 (21:37 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Fri, 8 May 2020 18:37:55 +0000 (21:37 +0300)
1  2 
config/config.exs
lib/pleroma/web/admin_api/admin_api_controller.ex
lib/pleroma/web/mastodon_api/controllers/search_controller.ex
lib/pleroma/web/mastodon_api/views/account_view.ex
lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex
test/web/mastodon_api/views/notification_view_test.exs
test/web/mastodon_api/views/status_view_test.exs

index d698e6028ce043fdddd98faa4b6c3ee0f4e3be55,e703c1632fbfe2974c790605a0e7c55fcff0f862..c51884f3aa05efec46499789679635a46cd73f74
@@@ -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,
index e0e1a2ceb27ae3674774e3138239f2c965f8f169,9f1fd3aeb334f273577a189f460cb55229937096..d2c5a6b9c0d885b65d7fcc32e42e60c3ce8eb956
@@@ -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"])