Merge remote-tracking branch 'remotes/origin/develop' into chore/elixir-1.11
authorIvan Tashkinov <ivantashkinov@gmail.com>
Sat, 17 Oct 2020 14:53:47 +0000 (17:53 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Sat, 17 Oct 2020 14:53:47 +0000 (17:53 +0300)
1  2 
config/config.exs
lib/pleroma/application.ex
lib/pleroma/web/activity_pub/activity_pub_controller.ex
mix.exs
mix.lock
test/pleroma/notification_test.exs
test/pleroma/web/activity_pub/activity_pub_test.exs
test/pleroma/web/common_api_test.exs
test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs

diff --combined config/config.exs
index 3d1f4d4ba10dc59c3e36559951c292653674f0d6,2c614236033863a8560fbeae068f54eb0c24fe51..124f30a77b3cc6713f3901b007b2f7a10f5e7cd8
@@@ -123,6 -123,7 +123,6 @@@ websocket_config = 
  
  # Configures the endpoint
  config :pleroma, Pleroma.Web.Endpoint,
 -  instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
    url: [host: "localhost"],
    http: [
      ip: {127, 0, 0, 1},
    secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
    signing_salt: "CqaoopA2",
    render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
 -  pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
 +  pubsub_server: Pleroma.PubSub,
    secure_cookie_flag: true,
    extra_cookie_attrs: [
      "SameSite=Lax"
@@@ -801,6 -802,8 +801,8 @@@ config :pleroma, :hackney_pools
      timeout: 300_000
    ]
  
+ config :pleroma, :majic_pool, size: 2
  private_instance? = :if_instance_is_private
  
  config :pleroma, :restrict_unauthenticated,
index 4b2512acd1012f6798518c98c93f706e2846bd2b,301b4e2735017efc9be8f362dadea9af25a193aa..d7e3a649fdaf9d303256aae8e75dc5408516677d
@@@ -95,11 -95,12 +95,12 @@@ defmodule Pleroma.Application d
          [
            Pleroma.Stats,
            Pleroma.JobQueueMonitor,
+           {Majic.Pool, [name: Pleroma.MajicPool, pool_size: Config.get([:majic_pool, :size], 2)]},
            {Oban, Config.get(Oban)}
          ] ++
          task_children(@env) ++
          dont_run_in_test(@env) ++
 -        chat_child(@env, chat_enabled?()) ++
 +        chat_child(chat_enabled?()) ++
          [
            Pleroma.Web.Endpoint,
            Pleroma.Gopher.Server
      ]
    end
  
 -  defp chat_child(_env, true) do
 -    [Pleroma.Web.ChatChannel.ChatChannelState]
 +  defp chat_child(true) do
 +    [
 +      Pleroma.Web.ChatChannel.ChatChannelState,
 +      {Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
 +    ]
    end
  
 -  defp chat_child(_, _), do: []
 +  defp chat_child(_), do: []
  
    defp task_children(:test) do
      [
index c3fce711de6c97e15c2120bf4a9f842cc3504938,570bcc7e7384613378d0462737cc8f435a3b859f..44f09be75fa9db3d7773d17a1a29e76a0c6cc9a0
@@@ -45,6 -45,8 +45,8 @@@ defmodule Pleroma.Web.ActivityPub.Activ
      when action in [:read_inbox, :update_outbox, :whoami, :upload_media]
    )
  
+   plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:upload_media])
    plug(
      Pleroma.Web.Plugs.Cache,
      [query_params: false, tracking_fun: &__MODULE__.track_object_fetch/2]
        object =
          object
          |> Map.merge(Map.take(params, ["to", "cc"]))
 -        |> Map.put("attributedTo", user.ap_id())
 +        |> Map.put("attributedTo", user.ap_id)
          |> Transmogrifier.fix_object()
  
        ActivityPub.create(%{
          %{assigns: %{user: %User{nickname: nickname} = user}} = conn,
          %{"nickname" => nickname} = params
        ) do
 -    actor = user.ap_id()
 +    actor = user.ap_id
  
      params =
        params
diff --combined mix.exs
index 185734f4366f4da22e01042851be42439cc1dee1,427329d38d2ab51b0ff44d4d0dabc85de8030bc2..c943d3e17d34005af30553d86ae6fc92ddef8c18
+++ b/mix.exs
@@@ -114,10 -114,10 +114,10 @@@ defmodule Pleroma.Mixfile d
    # Type `mix help deps` for examples and options.
    defp deps do
      [
 -      {:phoenix, "~> 1.4.17"},
 +      {:phoenix, "~> 1.5.5"},
        {:tzdata, "~> 1.0.3"},
        {:plug_cowboy, "~> 2.3"},
 -      {:phoenix_pubsub, "~> 1.1"},
 +      {:phoenix_pubsub, "~> 2.0"},
        {:phoenix_ecto, "~> 4.0"},
        {:ecto_enum, "~> 1.4"},
        {:ecto_sql, "~> 3.4.4"},
        {:telemetry, "~> 0.3"},
        {:poolboy, "~> 1.5"},
        {:prometheus, "~> 4.6"},
 -      {:prometheus_ex, "~> 3.0"},
 +      {:prometheus_ex,
 +       git: "https://git.pleroma.social/pleroma/elixir-libraries/prometheus.ex.git",
 +       ref: "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5",
 +       override: true},
        {:prometheus_plugs, "~> 1.1"},
        {:prometheus_phoenix, "~> 1.3"},
        {:prometheus_ecto, "~> 1.4"},
         git: "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git",
         ref: "e0f16822d578866e186a0974d65ad58cddc1e2ab"},
        {:restarter, path: "./restarter"},
+       {:majic,
+        git: "https://git.pleroma.social/pleroma/elixir-libraries/majic", branch: "develop"},
        {:open_api_spex,
         git: "https://git.pleroma.social/pleroma/elixir-libraries/open_api_spex.git",
         ref: "f296ac0924ba3cf79c7a588c4c252889df4c2edd"},
diff --combined mix.lock
index af4a0cdbbb874387ae459d40c74d654ec2c0b1da,1f28854405ac407bf651efedfb3f362e45ffa47e..8972959daa833832cf7601db80c52814d28cc1b5
+++ b/mix.lock
@@@ -18,9 -18,8 +18,9 @@@
    "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
    "cors_plug": {:hex, :cors_plug, "2.0.2", "2b46083af45e4bc79632bd951550509395935d3e7973275b2b743bd63cc942ce", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f0d0e13f71c51fd4ef8b2c7e051388e4dfb267522a83a22392c856de7e46465f"},
    "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
 +  "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.0", "69fdb5cf92df6373e15675eb4018cf629f5d8e35e74841bb637d6596cb797bbc", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "42868c229d9a2900a1501c5d0355bfd46e24c862c322b0b4f5a6f14fe0216753"},
    "cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
 -  "credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"},
 +  "credo": {:hex, :credo, "1.4.1", "16392f1edd2cdb1de9fe4004f5ab0ae612c92e230433968eab00aafd976282fc", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "155f8a2989ad77504de5d8291fa0d41320fdcaa6a1030472e9967f285f8c7692"},
    "crontab": {:hex, :crontab, "1.1.8", "2ce0e74777dfcadb28a1debbea707e58b879e6aa0ffbf9c9bb540887bce43617", [:mix], [{:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"},
    "crypt": {:git, "https://github.com/msantos/crypt.git", "f63a705f92c26955977ee62a313012e309a4d77a", [ref: "f63a705f92c26955977ee62a313012e309a4d77a"]},
    "custom_base": {:hex, :custom_base, "0.2.1", "4a832a42ea0552299d81652aa0b1f775d462175293e99dfbe4d7dbaab785a706", [:mix], [], "hexpm", "8df019facc5ec9603e94f7270f1ac73ddf339f56ade76a721eaa57c1493ba463"},
@@@ -33,7 -32,7 +33,7 @@@
    "ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
    "ecto_sql": {:hex, :ecto_sql, "3.4.5", "30161f81b167d561a9a2df4329c10ae05ff36eca7ccc84628f2c8b9fa1e43323", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.0", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "31990c6a3579b36a3c0841d34a94c275e727de8b84f58509da5f1b2032c98ac2"},
    "eimp": {:hex, :eimp, "1.0.14", "fc297f0c7e2700457a95a60c7010a5f1dcb768a083b6d53f49cd94ab95a28f22", [:rebar3], [{:p1_utils, "1.0.18", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "501133f3112079b92d9e22da8b88bf4f0e13d4d67ae9c15c42c30bd25ceb83b6"},
-   "elixir_make": {:hex, :elixir_make, "0.6.0", "38349f3e29aff4864352084fc736fa7fa0f2995a819a737554f7ebd28b85aaab", [:mix], [], "hexpm", "d522695b93b7f0b4c0fcb2dfe73a6b905b1c301226a5a55cb42e5b14d509e050"},
+   "elixir_make": {:hex, :elixir_make, "0.6.1", "8faa29a5597faba999aeeb72bbb9c91694ef8068f0131192fb199f98d32994ef", [:mix], [], "hexpm", "35d33270680f8d839a4003c3e9f43afb595310a592405a00afc12de4c7f55a18"},
    "esshd": {:hex, :esshd, "0.1.1", "d4dd4c46698093a40a56afecce8a46e246eb35463c457c246dacba2e056f31b5", [:mix], [], "hexpm", "d73e341e3009d390aa36387dc8862860bf9f874c94d9fd92ade2926376f49981"},
    "eternal": {:hex, :eternal, "1.2.1", "d5b6b2499ba876c57be2581b5b999ee9bdf861c647401066d3eeed111d096bc4", [:mix], [], "hexpm", "b14f1dc204321429479c569cfbe8fb287541184ed040956c8862cb7a677b8406"},
    "ex2ms": {:hex, :ex2ms, "1.5.0", "19e27f9212be9a96093fed8cdfbef0a2b56c21237196d26760f11dfcfae58e97", [:mix], [], "hexpm"},
@@@ -66,6 -65,7 +66,7 @@@
    "jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"},
    "libring": {:hex, :libring, "1.4.0", "41246ba2f3fbc76b3971f6bce83119dfec1eee17e977a48d8a9cfaaf58c2a8d6", [:mix], [], "hexpm"},
    "linkify": {:hex, :linkify, "0.2.0", "2518bbbea21d2caa9d372424e1ad845b640c6630e2d016f1bd1f518f9ebcca28", [:mix], [], "hexpm", "b8ca8a68b79e30b7938d6c996085f3db14939f29538a59ca5101988bb7f917f6"},
+   "majic": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/majic", "4c692e544b28d1f5e543fb8a44be090f8cd96f80", [branch: "develop"]},
    "makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},
    "makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
    "meck": {:hex, :meck, "0.8.13", "ffedb39f99b0b99703b8601c6f17c7f76313ee12de6b646e671e3188401f7866", [:rebar3], [], "hexpm", "d34f013c156db51ad57cc556891b9720e6a1c1df5fe2e15af999c84d6cebeb1a"},
    "p1_utils": {:hex, :p1_utils, "1.0.18", "3fe224de5b2e190d730a3c5da9d6e8540c96484cf4b4692921d1e28f0c32b01c", [:rebar3], [], "hexpm", "1fc8773a71a15553b179c986b22fbeead19b28fe486c332d4929700ffeb71f88"},
    "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"},
    "pbkdf2_elixir": {:hex, :pbkdf2_elixir, "1.2.1", "9cbe354b58121075bd20eb83076900a3832324b7dd171a6895fab57b6bb2752c", [:mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}], "hexpm", "d3b40a4a4630f0b442f19eca891fcfeeee4c40871936fed2f68e1c4faa30481f"},
 -  "phoenix": {:hex, :phoenix, "1.4.17", "1b1bd4cff7cfc87c94deaa7d60dd8c22e04368ab95499483c50640ef3bd838d8", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.8.1 or ~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a8e5d7a3d76d452bb5fb86e8b7bd115f737e4f8efe202a463d4aeb4a5809611"},
 -  "phoenix_ecto": {:hex, :phoenix_ecto, "4.1.0", "a044d0756d0464c5a541b4a0bf4bcaf89bffcaf92468862408290682c73ae50d", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "c5e666a341ff104d0399d8f0e4ff094559b2fde13a5985d4cb5023b2c2ac558b"},
 +  "phoenix": {:hex, :phoenix, "1.5.6", "8298cdb4e0f943242ba8410780a6a69cbbe972fef199b341a36898dd751bdd66", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0dc4d39af1306b6aa5122729b0a95ca779e42c708c6fe7abbb3d336d5379e956"},
 +  "phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"},
    "phoenix_html": {:hex, :phoenix_html, "2.14.2", "b8a3899a72050f3f48a36430da507dd99caf0ac2d06c77529b1646964f3d563e", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "58061c8dfd25da5df1ea0ca47c972f161beb6c875cd293917045b92ffe1bf617"},
 -  "phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.2", "496c303bdf1b2e98a9d26e89af5bba3ab487ba3a3735f74bf1f4064d2a845a3e", [:mix], [], "hexpm", "1f13f9f0f3e769a667a6b6828d29dec37497a082d195cc52dbef401a9b69bf38"},
 -  "phoenix_swoosh": {:hex, :phoenix_swoosh, "0.3.0", "2acfa0db038a7649e0a4614eee970e6ed9a39d191ccd79a03583b51d0da98165", [:mix], [{:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:swoosh, "~> 1.0", [hex: :swoosh, repo: "hexpm", optional: false]}], "hexpm", "b8bbae4b59a676de6b8bd8675eda37bc8b4424812ae429d6fdcb2b039e00003b"},
 +  "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
 +  "phoenix_swoosh": {:hex, :phoenix_swoosh, "0.3.2", "43d3518349a22b8b1910ea28b4dd5119926d5017b3187db3fbd1a1e05769a851", [:mix], [{:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:swoosh, "~> 1.0", [hex: :swoosh, repo: "hexpm", optional: false]}], "hexpm", "3e2ac4e883db7af0702d75ba00c19901760e8342b91f8f66e13941de552e777f"},
    "plug": {:hex, :plug, "1.10.4", "41eba7d1a2d671faaf531fa867645bd5a3dce0957d8e2a3f398ccff7d2ef017f", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad1e233fe73d2eec56616568d260777b67f53148a999dc2d048f4eb9778fe4a0"},
 -  "plug_cowboy": {:hex, :plug_cowboy, "2.3.0", "149a50e05cb73c12aad6506a371cd75750c0b19a32f81866e1a323dda9e0e99d", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bc595a1870cef13f9c1e03df56d96804db7f702175e4ccacdb8fc75c02a7b97e"},
 -  "plug_crypto": {:hex, :plug_crypto, "1.1.2", "bdd187572cc26dbd95b87136290425f2b580a116d3fb1f564216918c9730d227", [:mix], [], "hexpm", "6b8b608f895b6ffcfad49c37c7883e8df98ae19c6a28113b02aa1e9c5b22d6b5"},
 +  "plug_cowboy": {:hex, :plug_cowboy, "2.4.0", "e936ef151751f386804c51f87f7300f5aaae6893cdad726559c3930c6c032948", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e25ddcfc06b1b76e55af79d078b03cbc86bbcb99ce4e5e0a5e4a8114ee039be6"},
 +  "plug_crypto": {:hex, :plug_crypto, "1.2.0", "1cb20793aa63a6c619dd18bb33d7a3aa94818e5fd39ad357051a67f26dfa2df6", [:mix], [], "hexpm", "a48b538ae8bf381ffac344520755f3007cc10bd8e90b240af98ea29b69683fc2"},
    "plug_static_index_html": {:hex, :plug_static_index_html, "1.0.0", "840123d4d3975585133485ea86af73cb2600afd7f2a976f9f5fd8b3808e636a0", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "79fd4fcf34d110605c26560cbae8f23c603ec4158c08298bd4360fdea90bb5cf"},
    "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"},
    "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
    "pot": {:hex, :pot, "0.11.0", "61bad869a94534739dd4614a25a619bc5c47b9970e9a0ea5bef4628036fc7a16", [:rebar3], [], "hexpm", "57ee6ee6bdeb639661ffafb9acefe3c8f966e45394de6a766813bb9e1be4e54b"},
    "prometheus": {:hex, :prometheus, "4.6.0", "20510f381db1ccab818b4cf2fac5fa6ab5cc91bc364a154399901c001465f46f", [:mix, :rebar3], [], "hexpm", "4905fd2992f8038eccd7aa0cd22f40637ed618c0bed1f75c05aacec15b7545de"},
    "prometheus_ecto": {:hex, :prometheus_ecto, "1.4.3", "3dd4da1812b8e0dbee81ea58bb3b62ed7588f2eae0c9e97e434c46807ff82311", [:mix], [{:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "8d66289f77f913b37eda81fd287340c17e61a447549deb28efc254532b2bed82"},
 -  "prometheus_ex": {:hex, :prometheus_ex, "3.0.5", "fa58cfd983487fc5ead331e9a3e0aa622c67232b3ec71710ced122c4c453a02f", [:mix], [{:prometheus, "~> 4.0", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm", "9fd13404a48437e044b288b41f76e64acd9735fb8b0e3809f494811dfa66d0fb"},
 +  "prometheus_ex": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/prometheus.ex.git", "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5", [ref: "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5"]},
    "prometheus_phoenix": {:hex, :prometheus_phoenix, "1.3.0", "c4b527e0b3a9ef1af26bdcfbfad3998f37795b9185d475ca610fe4388fdd3bb5", [:mix], [{:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.3 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "c4d1404ac4e9d3d963da601db2a7d8ea31194f0017057fabf0cfb9bf5a6c8c75"},
    "prometheus_plugs": {:hex, :prometheus_plugs, "1.1.5", "25933d48f8af3a5941dd7b621c889749894d8a1082a6ff7c67cc99dec26377c5", [:mix], [{:accept, "~> 0.1", [hex: :accept, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}, {:prometheus_process_collector, "~> 1.1", [hex: :prometheus_process_collector, repo: "hexpm", optional: true]}], "hexpm", "0273a6483ccb936d79ca19b0ab629aef0dba958697c94782bb728b920dfc6a79"},
    "quack": {:hex, :quack, "0.1.1", "cca7b4da1a233757fdb44b3334fce80c94785b3ad5a602053b7a002b5a8967bf", [:mix], [{:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: false]}, {:tesla, "~> 1.2.0", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "d736bfa7444112eb840027bb887832a0e403a4a3437f48028c3b29a2dbbd2543"},
    "sleeplocks": {:hex, :sleeplocks, "1.1.1", "3d462a0639a6ef36cc75d6038b7393ae537ab394641beb59830a1b8271faeed3", [:rebar3], [], "hexpm", "84ee37aeff4d0d92b290fff986d6a95ac5eedf9b383fadfd1d88e9b84a1c02e1"},
    "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.5", "6eaf7ad16cb568bb01753dbbd7a95ff8b91c7979482b95f38443fe2c8852a79b", [:make, :mix, :rebar3], [], "hexpm", "13104d7897e38ed7f044c4de953a6c28597d1c952075eb2e328bc6d6f2bfc496"},
    "sweet_xml": {:hex, :sweet_xml, "0.6.6", "fc3e91ec5dd7c787b6195757fbcf0abc670cee1e4172687b45183032221b66b8", [:mix], [], "hexpm", "2e1ec458f892ffa81f9f8386e3f35a1af6db7a7a37748a64478f13163a1f3573"},
 -  "swoosh": {:hex, :swoosh, "1.0.0", "c547cfc83f30e12d5d1fdcb623d7de2c2e29a5becfc68bf8f42ba4d23d2c2756", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "b3b08e463f876cb6167f7168e9ad99a069a724e124bcee61847e0e1ed13f4a0d"},
 +  "swoosh": {:hex, :swoosh, "1.0.6", "6765e334c67dacabe721f0d701c7e5a6f06e4595c90df6f91e73ebd54d555833", [:mix], [{:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "7c50ef78e4acfd1cbd4907dc1fa87b5540675a6be9dc979d04890f49d7ec1830"},
    "syslog": {:hex, :syslog, "1.1.0", "6419a232bea84f07b56dc575225007ffe34d9fdc91abe6f1b2f254fd71d8efc2", [:rebar3], [], "hexpm", "4c6a41373c7e20587be33ef841d3de6f3beba08519809329ecc4d27b15b659e1"},
    "telemetry": {:hex, :telemetry, "0.4.2", "2808c992455e08d6177322f14d3bdb6b625fbcfd233a73505870d8738a2f4599", [:rebar3], [], "hexpm", "2d1419bd9dda6a206d7b5852179511722e2b18812310d304620c7bd92a13fcef"},
    "tesla": {:git, "https://github.com/teamon/tesla/", "9f7261ca49f9f901ceb73b60219ad6f8a9f6aa30", [ref: "9f7261ca49f9f901ceb73b60219ad6f8a9f6aa30"]},
    "timex": {:hex, :timex, "3.6.2", "845cdeb6119e2fef10751c0b247b6c59d86d78554c83f78db612e3290f819bc2", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 0.1.8 or ~> 0.5 or ~> 1.0.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "26030b46199d02a590be61c2394b37ea25a3664c02fafbeca0b24c972025d47a"},
    "trailing_format_plug": {:hex, :trailing_format_plug, "0.0.7", "64b877f912cf7273bed03379936df39894149e35137ac9509117e59866e10e45", [:mix], [{:plug, "> 0.12.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bd4fde4c15f3e993a999e019d64347489b91b7a9096af68b2bdadd192afa693f"},
 -  "tzdata": {:hex, :tzdata, "1.0.3", "73470ad29dde46e350c60a66e6b360d3b99d2d18b74c4c349dbebbc27a09a3eb", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a6e1ee7003c4d04ecbd21dd3ec690d4c6662db5d3bbdd7262d53cdf5e7c746c1"},
 +  "tzdata": {:hex, :tzdata, "1.0.4", "a3baa4709ea8dba552dca165af6ae97c624a2d6ac14bd265165eaa8e8af94af6", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "b02637db3df1fd66dd2d3c4f194a81633d0e4b44308d36c1b2fdfd1e4e6f169b"},
    "ueberauth": {:hex, :ueberauth, "0.6.3", "d42ace28b870e8072cf30e32e385579c57b9cc96ec74fa1f30f30da9c14f3cc0", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "afc293d8a1140d6591b53e3eaf415ca92842cb1d32fad3c450c6f045f7f91b60"},
    "unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm", "1d1848c40487cdb0b30e8ed975e34e025860c02e419cb615d255849f3427439d"},
    "unsafe": {:hex, :unsafe, "1.0.1", "a27e1874f72ee49312e0a9ec2e0b27924214a05e3ddac90e91727bc76f8613d8", [:mix], [], "hexpm", "6c7729a2d214806450d29766abc2afaa7a2cbecf415be64f36a6691afebb50e5"},
index ac43096fb21ad62bdbc15e77e8b1904d86a0da0f,0e9630f28518297f7a9be155d169a007debd0362..a74fb7bc2cc86812792ff5ba7360775a52d0a7a8
@@@ -346,7 -346,7 +346,7 @@@ defmodule Pleroma.NotificationTest d
    describe "follow / follow_request notifications" do
      test "it creates `follow` notification for approved Follow activity" do
        user = insert(:user)
-       followed_user = insert(:user, locked: false)
+       followed_user = insert(:user, is_locked: false)
  
        {:ok, _, _, _activity} = CommonAPI.follow(user, followed_user)
        assert FollowingRelationship.following?(user, followed_user)
  
      test "it creates `follow_request` notification for pending Follow activity" do
        user = insert(:user)
-       followed_user = insert(:user, locked: true)
+       followed_user = insert(:user, is_locked: true)
  
        {:ok, _, _, _activity} = CommonAPI.follow(user, followed_user)
        refute FollowingRelationship.following?(user, followed_user)
  
      test "it doesn't create a notification for follow-unfollow-follow chains" do
        user = insert(:user)
-       followed_user = insert(:user, locked: false)
+       followed_user = insert(:user, is_locked: false)
  
        {:ok, _, _, _activity} = CommonAPI.follow(user, followed_user)
        assert FollowingRelationship.following?(user, followed_user)
      end
  
      test "dismisses the notification on follow request rejection" do
-       user = insert(:user, locked: true)
+       user = insert(:user, is_locked: true)
        follower = insert(:user)
        {:ok, _, _, _follow_activity} = CommonAPI.follow(follower, user)
 -      assert [notification] = Notification.for_user(user)
 +      assert [_notification] = Notification.for_user(user)
        {:ok, _follower} = CommonAPI.reject_follow_request(follower, user)
        assert [] = Notification.for_user(user)
      end
index 9f641ae1cf70ea96e3b8491e6607cd91512948fe,1a8a844ca89466202cf92e069634828096a90b95..9200aef6573525fe73c48cdb89a9129f998c56da
@@@ -505,22 -505,22 +505,22 @@@ defmodule Pleroma.Web.ActivityPub.Activ
  
        # public
        {:ok, _} = CommonAPI.post(user2, Map.put(reply_data, :visibility, "public"))
 -      assert %{data: data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
 +      assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
        assert object.data["repliesCount"] == 1
  
        # unlisted
        {:ok, _} = CommonAPI.post(user2, Map.put(reply_data, :visibility, "unlisted"))
 -      assert %{data: data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
 +      assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
        assert object.data["repliesCount"] == 2
  
        # private
        {:ok, _} = CommonAPI.post(user2, Map.put(reply_data, :visibility, "private"))
 -      assert %{data: data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
 +      assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
        assert object.data["repliesCount"] == 2
  
        # direct
        {:ok, _} = CommonAPI.post(user2, Map.put(reply_data, :visibility, "direct"))
 -      assert %{data: data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
 +      assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
        assert object.data["repliesCount"] == 2
      end
    end
    describe "uploading files" do
      setup do
        test_file = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }
  
      test "creates an undo activity for a pending follow request" do
        follower = insert(:user)
-       followed = insert(:user, %{locked: true})
+       followed = insert(:user, %{is_locked: true})
  
        {:ok, _, _, follow_activity} = CommonAPI.follow(follower, followed)
        {:ok, activity} = ActivityPub.unfollow(follower, followed)
index aabfc6db8340275f18cd1261a618ad298253956a,f5d09f39657eabd614de0491b3a665a445a7df3f..64476a099e8b53920d098472baf9ec3ee524fc41
@@@ -100,7 -100,7 +100,7 @@@ defmodule Pleroma.Web.CommonAPITest d
        recipient = insert(:user)
  
        file = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }
        assert {:error, "The status is over the character limit"} =
                 CommonAPI.post(user, %{status: "foobar"})
  
 -      assert {:ok, activity} = CommonAPI.post(user, %{status: "12345"})
 +      assert {:ok, _activity} = CommonAPI.post(user, %{status: "12345"})
      end
  
      test "it can handle activities that expire" do
  
      test "cancels a pending follow for a local user" do
        follower = insert(:user)
-       followed = insert(:user, locked: true)
+       followed = insert(:user, is_locked: true)
  
        assert {:ok, follower, followed, %{id: activity_id, data: %{"state" => "pending"}}} =
                 CommonAPI.follow(follower, followed)
  
      test "cancels a pending follow for a remote user" do
        follower = insert(:user)
-       followed = insert(:user, locked: true, local: false, ap_enabled: true)
+       followed = insert(:user, is_locked: true, local: false, ap_enabled: true)
  
        assert {:ok, follower, followed, %{id: activity_id, data: %{"state" => "pending"}}} =
                 CommonAPI.follow(follower, followed)
  
    describe "accept_follow_request/2" do
      test "after acceptance, it sets all existing pending follow request states to 'accept'" do
-       user = insert(:user, locked: true)
+       user = insert(:user, is_locked: true)
        follower = insert(:user)
        follower_two = insert(:user)
  
      end
  
      test "after rejection, it sets all existing pending follow request states to 'reject'" do
-       user = insert(:user, locked: true)
+       user = insert(:user, is_locked: true)
        follower = insert(:user)
        follower_two = insert(:user)
  
      end
  
      test "doesn't create a following relationship if the corresponding follow request doesn't exist" do
-       user = insert(:user, locked: true)
+       user = insert(:user, is_locked: true)
        not_follower = insert(:user)
        CommonAPI.accept_follow_request(not_follower, user)
  
index fbce5665a32f366c51a7f4e8644c2ba51628b37f,7336fa8de756f1ab9a1106758c26d85cb10167f3..dcc0c81ece43617fdc1c6a8080587d5089401509
@@@ -32,7 -32,7 +32,7 @@@ defmodule Pleroma.Web.MastodonAPI.Accou
      test "works by nickname" do
        user = insert(:user)
  
 -      assert %{"id" => user_id} =
 +      assert %{"id" => _user_id} =
                 build_conn()
                 |> get("/api/v1/accounts/#{user.nickname}")
                 |> json_response_and_validate_schema(200)
@@@ -43,7 -43,7 +43,7 @@@
  
        user = insert(:user, nickname: "user@example.com", local: false)
  
 -      assert %{"id" => user_id} =
 +      assert %{"id" => _user_id} =
                 build_conn()
                 |> get("/api/v1/accounts/#{user.nickname}")
                 |> json_response_and_validate_schema(200)
        other_user = insert(:user)
  
        file = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }
      end
  
      test "cancelling follow request", %{conn: conn} do
-       %{id: other_user_id} = insert(:user, %{locked: true})
+       %{id: other_user_id} = insert(:user, %{is_locked: true})
  
        assert %{"id" => ^other_user_id, "following" => false, "requested" => true} =
                 conn
      test "returns lists to which the account belongs" do
        %{user: user, conn: conn} = oauth_access(["read:lists"])
        other_user = insert(:user)
 -      assert {:ok, %Pleroma.List{id: list_id} = list} = Pleroma.List.create("Test List", user)
 +      assert {:ok, %Pleroma.List{id: _list_id} = list} = Pleroma.List.create("Test List", user)
        {:ok, %{following: _following}} = Pleroma.List.follow(list, other_user)
  
 -      assert [%{"id" => list_id, "title" => "Test List"}] =
 +      assert [%{"id" => _list_id, "title" => "Test List"}] =
                 conn
                 |> get("/api/v1/accounts/#{other_user.id}/lists")
                 |> json_response_and_validate_schema(200)
index 497a6bb1207814a09be483c9c322a4462b33eeb3,61359214a1085001d9dc4152c1e78d0208aab6ae..436608e515094a3733a02d5ec294b25e6cac582d
@@@ -167,7 -167,7 +167,7 @@@ defmodule Pleroma.Web.MastodonAPI.Statu
  
      test "posting an undefined status with an attachment", %{user: user, conn: conn} do
        file = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }
          |> Kernel.<>("Z")
  
        file = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }
          |> get("/api/v1/statuses/#{reblog_activity1.id}")
  
        assert %{
 -               "reblog" => %{"id" => id, "reblogged" => false, "reblogs_count" => 2},
 +               "reblog" => %{"id" => _id, "reblogged" => false, "reblogs_count" => 2},
                 "reblogged" => false,
                 "favourited" => false,
                 "bookmarked" => false
index 2f509410e132f539e3779591b4592003e780681a,d6be92869a85f2e1f268e9793edbb809dbe494be..289119d4531e78ee96715ae48964f4b22d199012
@@@ -24,7 -24,7 +24,7 @@@ defmodule Pleroma.Web.PleromaAPI.Mascot
      assert json_response_and_validate_schema(ret_conn, 415)
  
      file = %Plug.Upload{
-       content_type: "image/jpg",
+       content_type: "image/jpeg",
        path: Path.absname("test/fixtures/image.jpg"),
        filename: "an_image.jpg"
      }
@@@ -34,7 -34,7 +34,7 @@@
        |> put_req_header("content-type", "multipart/form-data")
        |> put("/api/v1/pleroma/mascot", %{"file" => file})
  
 -    assert %{"id" => _, "type" => image} = json_response_and_validate_schema(conn, 200)
 +    assert %{"id" => _, "type" => _image} = json_response_and_validate_schema(conn, 200)
    end
  
    test "mascot retrieving" do
@@@ -48,7 -48,7 +48,7 @@@
  
      # When a user sets their mascot, we should get that back
      file = %Plug.Upload{
-       content_type: "image/jpg",
+       content_type: "image/jpeg",
        path: Path.absname("test/fixtures/image.jpg"),
        filename: "an_image.jpg"
      }