alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.ControllerHelper
alias Pleroma.Web.Endpoint
- alias Pleroma.Web.FederatingPlug
+ alias Pleroma.Web.Plugs.FederatingPlug
alias Pleroma.Web.Federator
require Logger
alias Pleroma.Web.Router
plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
- unless_func: &Pleroma.Web.FederatingPlug.federating?/1
+ unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
plug(
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Web.FederatingPlug do
+defmodule Pleroma.Web.Plugs.FederatingPlug do
import Plug.Conn
def init(options) do
plug(:assign_id)
plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
- unless_func: &Pleroma.Web.FederatingPlug.federating?/1
+ unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
)
@page_keys ["max_id", "min_id", "limit", "since_id", "order"]
@status_types ["Article", "Event", "Note", "Video", "Page", "Question"]
- plug(Pleroma.Web.FederatingPlug)
+ plug(Pleroma.Web.Plugs.FederatingPlug)
# Note: follower can submit the form (with password auth) not being signed in (having no token)
plug(
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.WebFinger
- plug(Pleroma.Web.FederatingPlug when action == :remote_subscribe)
+ plug(Pleroma.Web.Plugs.FederatingPlug when action == :remote_subscribe)
plug(
OAuthScopesPlug,
alias Pleroma.Web.WebFinger
plug(Pleroma.Web.Plugs.SetFormatPlug)
- plug(Pleroma.Web.FederatingPlug)
+ plug(Pleroma.Web.Plugs.FederatingPlug)
def host_meta(conn, _params) do
xml = WebFinger.host_meta()
conn =
build_conn()
- |> Pleroma.Web.FederatingPlug.call(%{})
+ |> Pleroma.Web.Plugs.FederatingPlug.call(%{})
assert conn.status == 404
assert conn.halted
conn =
build_conn()
- |> Pleroma.Web.FederatingPlug.call(%{})
+ |> Pleroma.Web.Plugs.FederatingPlug.call(%{})
refute conn.status
refute conn.halted