Remove _misskey_reaction matching (#500)
[akkoma] / lib / pleroma / web / plugs / user_enabled_plug.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Plugs.UserEnabledPlug do
6 alias Pleroma.Helpers.AuthHelper
7 alias Pleroma.User
8
9 def init(options) do
10 options
11 end
12
13 def call(%{assigns: %{user: %User{} = user}} = conn, _) do
14 if User.account_status(user) == :active do
15 conn
16 else
17 AuthHelper.drop_auth_info(conn)
18 end
19 end
20
21 def call(conn, _) do
22 conn
23 end
24 end