defmodule Mix.Tasks.Pleroma.Relay do
use Mix.Task
- alias Pleroma.Web.ActivityPub.Relay
alias Mix.Tasks.Pleroma.Common
+ alias Pleroma.Web.ActivityPub.Relay
@shortdoc "Manages remote relays"
@moduledoc """
defmodule Mix.Tasks.Pleroma.Uploads do
use Mix.Task
+ alias Mix.Tasks.Pleroma.Common
alias Pleroma.Upload
alias Pleroma.Uploaders.Local
- alias Mix.Tasks.Pleroma.Common
require Logger
@log_every 50
defmodule Mix.Tasks.Pleroma.User do
use Mix.Task
import Ecto.Changeset
+ alias Mix.Tasks.Pleroma.Common
alias Pleroma.Repo
alias Pleroma.User
- alias Mix.Tasks.Pleroma.Common
@shortdoc "Manages Pleroma users"
@moduledoc """
import Ecto.Changeset
- alias Pleroma.User
- alias Pleroma.Repo
alias Pleroma.PasswordResetToken
+ alias Pleroma.Repo
+ alias Pleroma.User
schema "password_reset_tokens" do
belongs_to(:user, User, type: Pleroma.FlakeId)
defmodule Pleroma.Activity do
use Ecto.Schema
- alias Pleroma.Repo
alias Pleroma.Activity
alias Pleroma.Notification
+ alias Pleroma.Repo
import Ecto.Query
import Ecto.Changeset
import Ecto.Query
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
schema "filters" do
belongs_to(:user, User, type: Pleroma.FlakeId)
end
defmodule Pleroma.Gopher.Server.ProtocolHandler do
- alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Activity
alias Pleroma.HTML
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.ActivityPub.Visibility
def start_link(ref, socket, transport, opts) do
pid = spawn_link(__MODULE__, :init, [ref, socket, transport, opts])
@moduledoc "Instance."
alias Pleroma.Instances
- alias Pleroma.Repo
alias Pleroma.Instances.Instance
+ alias Pleroma.Repo
use Ecto.Schema
defmodule Pleroma.Notification do
use Ecto.Schema
- alias Pleroma.User
alias Pleroma.Activity
alias Pleroma.Notification
alias Pleroma.Repo
- alias Pleroma.Web.CommonAPI.Utils
+ alias Pleroma.User
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.CommonAPI.Utils
import Ecto.Query
defmodule Pleroma.Object do
use Ecto.Schema
- alias Pleroma.Repo
- alias Pleroma.Object
- alias Pleroma.User
alias Pleroma.Activity
+ alias Pleroma.Object
alias Pleroma.ObjectTombstone
+ alias Pleroma.Repo
+ alias Pleroma.User
import Ecto.Query
import Ecto.Changeset
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
- alias Pleroma.Web.HTTPSignatures
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.HTTPSignatures
import Plug.Conn
require Logger
import Plug.Conn
import Ecto.Query
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.OAuth.Token
@realm_reg Regex.compile!("Bearer\:?\s+(.*)$", "i")
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.UserFetcherPlug do
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
import Plug.Conn
defmodule Pleroma.Stats do
import Ecto.Query
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
def start_link do
agent = Agent.start_link(fn -> {[], %{}} end, name: __MODULE__)
defmodule Pleroma.ThreadMute do
use Ecto.Schema
+
alias Pleroma.Repo
- alias Pleroma.User
alias Pleroma.ThreadMute
+ alias Pleroma.User
+
require Ecto.Query
schema "thread_mutes" do
import Ecto.Changeset
import Ecto.Query
+ alias Comeonin.Pbkdf2
+ alias Pleroma.Activity
+ alias Pleroma.Formatter
+ alias Pleroma.Notification
+ alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.User
- alias Pleroma.Object
alias Pleroma.Web
- alias Pleroma.Activity
- alias Pleroma.Notification
- alias Comeonin.Pbkdf2
- alias Pleroma.Formatter
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI.Utils, as: CommonUtils
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.Websub
alias Pleroma.Web.OAuth
- alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.OStatus
alias Pleroma.Web.RelMe
+ alias Pleroma.Web.Websub
require Logger
import Ecto.Changeset
- alias Pleroma.UserInviteToken
alias Pleroma.Repo
+ alias Pleroma.UserInviteToken
schema "user_invite_tokens" do
field(:token, :string)
defmodule Pleroma.Web.ActivityPub.ActivityPub do
alias Pleroma.Activity
- alias Pleroma.Repo
+ alias Pleroma.Instances
+ alias Pleroma.Notification
alias Pleroma.Object
+ alias Pleroma.Repo
alias Pleroma.Upload
alias Pleroma.User
- alias Pleroma.Notification
- alias Pleroma.Instances
- alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.MRF
- alias Pleroma.Web.WebFinger
+ alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.Federator
alias Pleroma.Web.OStatus
+ alias Pleroma.Web.WebFinger
import Ecto.Query
import Pleroma.Web.ActivityPub.Utils
use Pleroma.Web, :controller
alias Pleroma.Activity
- alias Pleroma.User
alias Pleroma.Object
- alias Pleroma.Web.ActivityPub.ObjectView
- alias Pleroma.Web.ActivityPub.UserView
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Visibility
+ alias Pleroma.Web.ActivityPub.ObjectView
alias Pleroma.Web.ActivityPub.Relay
alias Pleroma.Web.ActivityPub.Transmogrifier
+ alias Pleroma.Web.ActivityPub.UserView
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.Federator
require Logger
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.Relay do
- alias Pleroma.User
- alias Pleroma.Object
alias Pleroma.Activity
+ alias Pleroma.Object
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
require Logger
A module to handle coding from internal to wire ActivityPub and back.
"""
alias Pleroma.Activity
- alias Pleroma.User
alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Visibility
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.Utils do
+ alias Ecto.Changeset
+ alias Ecto.UUID
+ alias Pleroma.Activity
+ alias Pleroma.Notification
+ alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web
- alias Pleroma.Object
- alias Pleroma.Activity
alias Pleroma.Web.ActivityPub.Visibility
- alias Pleroma.User
- alias Pleroma.Notification
- alias Pleroma.Web.Router.Helpers
alias Pleroma.Web.Endpoint
- alias Ecto.Changeset
- alias Ecto.UUID
+ alias Pleroma.Web.Router.Helpers
import Ecto.Query
defmodule Pleroma.Web.ActivityPub.UserView do
use Pleroma.Web, :view
- alias Pleroma.Web.WebFinger
- alias Pleroma.Web.Salmon
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Web.Router.Helpers
alias Pleroma.Web.Endpoint
+ alias Pleroma.Web.Router.Helpers
+ alias Pleroma.Web.Salmon
+ alias Pleroma.Web.WebFinger
import Ecto.Query
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Auth.PleromaAuthenticator do
- alias Pleroma.User
alias Comeonin.Pbkdf2
+ alias Pleroma.User
@behaviour Pleroma.Web.Auth.Authenticator
defmodule Pleroma.Web.ChatChannel do
use Phoenix.Channel
- alias Pleroma.Web.ChatChannel.ChatChannelState
alias Pleroma.User
+ alias Pleroma.Web.ChatChannel.ChatChannelState
def join("chat:public", _message, socket) do
send(self(), :after_join)
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.CommonAPI do
- alias Pleroma.User
- alias Pleroma.Repo
alias Pleroma.Activity
+ alias Pleroma.Formatter
alias Pleroma.Object
+ alias Pleroma.Repo
alias Pleroma.ThreadMute
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Formatter
import Pleroma.Web.CommonAPI.Utils
alias Calendar.Strftime
alias Comeonin.Pbkdf2
alias Pleroma.Activity
+ alias Pleroma.Config
alias Pleroma.Formatter
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.User
- alias Pleroma.Config
+ alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.Endpoint
alias Pleroma.Web.MediaProxy
- alias Pleroma.Web.ActivityPub.Utils
# This is a hack for twidere.
def get_by_id_or_ap_id(id) do
defmodule Pleroma.Web.Federator do
alias Pleroma.Activity
+ alias Pleroma.Jobs
alias Pleroma.User
- alias Pleroma.Web.WebFinger
- alias Pleroma.Web.Websub
- alias Pleroma.Web.Salmon
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.ActivityPub.Relay
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.Federator.RetryQueue
alias Pleroma.Web.OStatus
- alias Pleroma.Jobs
+ alias Pleroma.Web.Salmon
+ alias Pleroma.Web.WebFinger
+ alias Pleroma.Web.Websub
require Logger
import Ecto.Query
import Ecto.Changeset
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
@default_limit 20
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
use Pleroma.Web, :controller
+
alias Pleroma.Activity
alias Pleroma.Config
alias Pleroma.Filter
alias Pleroma.Stats
alias Pleroma.User
alias Pleroma.Web
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.CommonAPI
- alias Pleroma.Web.MediaProxy
-
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.FilterView
alias Pleroma.Web.MastodonAPI.ListView
+ alias Pleroma.Web.MastodonAPI.MastodonAPI
alias Pleroma.Web.MastodonAPI.MastodonView
- alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.Web.MastodonAPI.ReportView
- alias Pleroma.Web.MastodonAPI.MastodonAPI
- alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Web.ActivityPub.Visibility
+ alias Pleroma.Web.MastodonAPI.StatusView
+ alias Pleroma.Web.MediaProxy
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
alias Pleroma.Web.OAuth.Token
defmodule Pleroma.Web.MastodonAPI.Admin.AccountView do
use Pleroma.Web, :view
- alias Pleroma.Web.MastodonAPI.Admin.AccountView
alias Pleroma.User.Info
+ alias Pleroma.Web.MastodonAPI.Admin.AccountView
def render("index.json", %{users: users, count: count, page_size: page_size}) do
%{
defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
require Logger
- alias Pleroma.Web.OAuth.Token
alias Pleroma.Repo
alias Pleroma.User
+ alias Pleroma.Web.OAuth.Token
@behaviour :cowboy_websocket
# Pleroma: A lightweight social networking server
-# Copyright \xc2\xa9 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Metadata.Utils do
- alias Pleroma.HTML
alias Pleroma.Formatter
+ alias Pleroma.HTML
alias Pleroma.Web.MediaProxy
def scrub_html_and_truncate(%{data: %{"content" => content}} = object) do
defmodule Pleroma.Web.OAuth.Authorization do
use Ecto.Schema
- alias Pleroma.User
alias Pleroma.Repo
- alias Pleroma.Web.OAuth.Authorization
+ alias Pleroma.User
alias Pleroma.Web.OAuth.App
+ alias Pleroma.Web.OAuth.Authorization
import Ecto.Changeset
import Ecto.Query
defmodule Pleroma.Web.OAuth.OAuthController do
use Pleroma.Web, :controller
+ alias Comeonin.Pbkdf2
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.Auth.Authenticator
+ alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
alias Pleroma.Web.OAuth.Token
- alias Pleroma.Web.OAuth.App
- alias Pleroma.Repo
- alias Pleroma.User
- alias Comeonin.Pbkdf2
import Pleroma.Web.ControllerHelper, only: [oauth_scopes: 2]
import Ecto.Query
- alias Pleroma.User
alias Pleroma.Repo
- alias Pleroma.Web.OAuth.Token
+ alias Pleroma.User
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
+ alias Pleroma.Web.OAuth.Token
schema "oauth_tokens" do
field(:token, :string)
defmodule Pleroma.Web.OStatus.ActivityRepresenter do
alias Pleroma.Activity
- alias Pleroma.User
alias Pleroma.Object
+ alias Pleroma.User
alias Pleroma.Web.OStatus.UserRepresenter
require Logger
defmodule Pleroma.Web.OStatus.FeedRepresenter do
alias Pleroma.User
- alias Pleroma.Web.OStatus
alias Pleroma.Web.MediaProxy
+ alias Pleroma.Web.OStatus
alias Pleroma.Web.OStatus.ActivityRepresenter
alias Pleroma.Web.OStatus.UserRepresenter
defmodule Pleroma.Web.OStatus.DeleteHandler do
require Logger
- alias Pleroma.Web.XML
alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.XML
def handle_delete(entry, _doc \\ nil) do
with id <- XML.string_from_xpath("//id", entry),
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OStatus.FollowHandler do
- alias Pleroma.Web.XML
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.XML
def handle(entry, doc) do
with {:ok, actor} <- OStatus.find_make_or_update_user(doc),
defmodule Pleroma.Web.OStatus.NoteHandler do
require Logger
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.XML
+
alias Pleroma.Activity
alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.XML
@doc """
Get the context for this note. Uses this:
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OStatus.UnfollowHandler do
- alias Pleroma.Web.XML
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.XML
def handle(entry, doc) do
with {:ok, actor} <- OStatus.find_make_or_update_user(doc),
import Pleroma.Web.XML
require Logger
+ alias Pleroma.Activity
+ alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web
- alias Pleroma.Object
- alias Pleroma.Activity
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
- alias Pleroma.Web.WebFinger
- alias Pleroma.Web.Websub
+ alias Pleroma.Web.OStatus.DeleteHandler
alias Pleroma.Web.OStatus.FollowHandler
- alias Pleroma.Web.OStatus.UnfollowHandler
alias Pleroma.Web.OStatus.NoteHandler
- alias Pleroma.Web.OStatus.DeleteHandler
+ alias Pleroma.Web.OStatus.UnfollowHandler
+ alias Pleroma.Web.WebFinger
+ alias Pleroma.Web.Websub
def is_representable?(%Activity{data: data}) do
object = Object.normalize(data["object"])
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.ActivityPub.ActivityPubController
alias Pleroma.Web.ActivityPub.ObjectView
- alias Pleroma.Web.OStatus.ActivityRepresenter
- alias Pleroma.Web.OStatus.FeedRepresenter
+ alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.Federator
alias Pleroma.Web.OStatus
+ alias Pleroma.Web.OStatus.ActivityRepresenter
+ alias Pleroma.Web.OStatus.FeedRepresenter
alias Pleroma.Web.XML
plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming])
defmodule Pleroma.Web.Push.Impl do
@moduledoc "The module represents implementation push web notification"
- alias Pleroma.Repo
- alias Pleroma.User
alias Pleroma.Activity
+ alias Pleroma.Notification
alias Pleroma.Object
- alias Pleroma.Web.Push.Subscription
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.Metadata.Utils
- alias Pleroma.Notification
+ alias Pleroma.Web.Push.Subscription
require Logger
import Ecto.Query
defmodule Pleroma.Web.RichMedia.Helpers do
alias Pleroma.Activity
- alias Pleroma.Object
alias Pleroma.HTML
+ alias Pleroma.Object
alias Pleroma.Web.RichMedia.Parser
defp validate_page_url(page_url) when is_binary(page_url) do
defmodule Fallback.RedirectController do
use Pleroma.Web, :controller
- alias Pleroma.Web.Metadata
alias Pleroma.User
+ alias Pleroma.Web.Metadata
def redirector(conn, _params, code \\ 200) do
conn
alias Pleroma.Instances
alias Pleroma.User
- alias Pleroma.Web.XML
alias Pleroma.Web.OStatus.ActivityRepresenter
+ alias Pleroma.Web.XML
require Logger
defmodule Pleroma.Web.Streamer do
use GenServer
require Logger
- alias Pleroma.User
- alias Pleroma.Notification
alias Pleroma.Activity
+ alias Pleroma.Notification
alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.Visibility
@keepalive_interval :timer.seconds(30)
alias Comeonin.Pbkdf2
alias Pleroma.Emoji
alias Pleroma.PasswordResetToken
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web
+ alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.OStatus
alias Pleroma.Web.WebFinger
- alias Pleroma.Web.ActivityPub.ActivityPub
def show_password_reset(conn, %{"token" => token}) do
with %{used: false} = token <- Repo.get_by(PasswordResetToken, %{token: token}),
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
- alias Pleroma.UserInviteToken
- alias Pleroma.User
alias Pleroma.Activity
- alias Pleroma.Repo
+ alias Pleroma.Mailer
alias Pleroma.Object
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.UserEmail
- alias Pleroma.Mailer
+ alias Pleroma.UserInviteToken
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.TwitterAPI.UserView
import Ecto.Query
import Pleroma.Web.ControllerHelper, only: [json_response: 3]
alias Ecto.Changeset
- alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.Web.TwitterAPI.UserView
- alias Pleroma.Web.TwitterAPI.ActivityView
- alias Pleroma.Web.TwitterAPI.NotificationView
- alias Pleroma.Web.TwitterAPI.TokenView
- alias Pleroma.Web.CommonAPI
- alias Pleroma.Repo
alias Pleroma.Activity
+ alias Pleroma.Activity
+ alias Pleroma.Notification
+ alias Pleroma.Notification
alias Pleroma.Object
+ alias Pleroma.Object
+ alias Pleroma.Repo
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.User
- alias Pleroma.Notification
- alias Pleroma.Web.OAuth.Token
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.ActivityPub.Visibility
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.OAuth.Token
+ alias Pleroma.Web.TwitterAPI.ActivityView
alias Pleroma.Web.TwitterAPI.ActivityView
alias Pleroma.Web.TwitterAPI.NotificationView
+ alias Pleroma.Web.TwitterAPI.NotificationView
+ alias Pleroma.Web.TwitterAPI.TokenView
+ alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.TwitterAPI.UserView
- alias Pleroma.Activity
- alias Pleroma.Object
- alias Pleroma.Notification
- alias Pleroma.Repo
- alias Pleroma.User
+ alias Pleroma.Web.TwitterAPI.UserView
require Logger
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.Web.TwitterAPI.ActivityView
+ alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.TwitterAPI.UserView
- alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
import Ecto.Query
require Logger
@httpoison Application.get_env(:pleroma, :httpoison)
alias Pleroma.User
- alias Pleroma.XmlBuilder
alias Pleroma.Web
- alias Pleroma.Web.XML
- alias Pleroma.Web.Salmon
alias Pleroma.Web.OStatus
+ alias Pleroma.Web.Salmon
+ alias Pleroma.Web.XML
+ alias Pleroma.XmlBuilder
require Jason
require Logger
alias Ecto.Changeset
alias Pleroma.Instances
alias Pleroma.Repo
- alias Pleroma.Web.Websub.WebsubServerSubscription
- alias Pleroma.Web.Websub.WebsubClientSubscription
- alias Pleroma.Web.OStatus.FeedRepresenter
- alias Pleroma.Web.XML
alias Pleroma.Web.Endpoint
+ alias Pleroma.Web.Federator
alias Pleroma.Web.OStatus
+ alias Pleroma.Web.OStatus.FeedRepresenter
alias Pleroma.Web.Router.Helpers
- alias Pleroma.Web.Federator
+ alias Pleroma.Web.Websub.WebsubClientSubscription
+ alias Pleroma.Web.Websub.WebsubServerSubscription
+ alias Pleroma.Web.XML
require Logger
import Ecto.Query
alias Pleroma.Repo
alias Pleroma.User
- alias Pleroma.Web.Websub
alias Pleroma.Web.Federator
+ alias Pleroma.Web.Websub
alias Pleroma.Web.Websub.WebsubClientSubscription
require Logger
import Pleroma.Factory
+ alias Pleroma.Integration.WebsocketClient
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.OAuth
- alias Pleroma.Integration.WebsocketClient
alias Pleroma.Web.Streamer
@path Pleroma.Web.Endpoint.url()
defmodule Pleroma.JobsTest do
use ExUnit.Case, async: true
- alias Pleroma.Jobs
alias Jobs.WorkerMock
+ alias Pleroma.Jobs
setup do
state = %{
defmodule Pleroma.NotificationTest do
use Pleroma.DataCase
- alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.Web.CommonAPI
- alias Pleroma.User
alias Pleroma.Notification
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.Transmogrifier
+ alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.TwitterAPI.TwitterAPI
import Pleroma.Factory
describe "create_notifications" do
defmodule Pleroma.ObjectTest do
use Pleroma.DataCase
import Pleroma.Factory
- alias Pleroma.Repo
alias Pleroma.Object
+ alias Pleroma.Repo
test "returns an object by it's AP id" do
object = insert(:note)
defmodule Pleroma.Builders.UserBuilder do
- alias Pleroma.User
alias Pleroma.Repo
+ alias Pleroma.User
def build(data \\ %{}) do
user = %User{
defmodule Mix.Tasks.Pleroma.RelayTest do
alias Pleroma.Activity
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Relay
- alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.Utils
use Pleroma.DataCase
setup_all do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.UserTest do
- alias Pleroma.Builders.UserBuilder
alias Pleroma.Activity
+ alias Pleroma.Builders.UserBuilder
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.CommonAPI
defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- alias Pleroma.Web.ActivityPub.UserView
- alias Pleroma.Web.ActivityPub.ObjectView
+ alias Pleroma.Activity
+ alias Pleroma.Instances
alias Pleroma.Object
alias Pleroma.Repo
- alias Pleroma.Activity
alias Pleroma.User
- alias Pleroma.Instances
+ alias Pleroma.Web.ActivityPub.ObjectView
+ alias Pleroma.Web.ActivityPub.UserView
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
use Pleroma.DataCase
- alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Web.CommonAPI
alias Pleroma.Activity
+ alias Pleroma.Builders.ActivityBuilder
+ alias Pleroma.Instances
alias Pleroma.Object
alias Pleroma.User
- alias Pleroma.Instances
- alias Pleroma.Builders.ActivityBuilder
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.CommonAPI
import Pleroma.Factory
import Tesla.Mock
defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
use Pleroma.DataCase
+ alias Pleroma.Activity
+ alias Pleroma.Repo
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.OStatus
- alias Pleroma.Activity
- alias Pleroma.User
- alias Pleroma.Repo
alias Pleroma.Web.Websub.WebsubClientSubscription
import Pleroma.Factory
defmodule Pleroma.Web.ActivityPub.UtilsTest do
use Pleroma.DataCase
- alias Pleroma.Web.CommonAPI
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.CommonAPI
import Pleroma.Factory
use Pleroma.DataCase
import Pleroma.Factory
- alias Pleroma.Web.CommonAPI
alias Pleroma.Web.ActivityPub.ObjectView
+ alias Pleroma.Web.CommonAPI
test "renders a note object" do
note = insert(:note)
defmodule Pleroma.Web.ActivityPub.VisibilityTest do
use Pleroma.DataCase
- alias Pleroma.Web.CommonAPI
alias Pleroma.Web.ActivityPub.Visibility
+ alias Pleroma.Web.CommonAPI
import Pleroma.Factory
setup do
defmodule Pleroma.Web.CommonAPITest do
use Pleroma.DataCase
- alias Pleroma.Web.CommonAPI
- alias Pleroma.User
alias Pleroma.Activity
+ alias Pleroma.User
+ alias Pleroma.Web.CommonAPI
import Pleroma.Factory
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.CommonAPI.UtilsTest do
+ alias Pleroma.Builders.UserBuilder
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.Endpoint
- alias Pleroma.Builders.UserBuilder
use Pleroma.DataCase
test "it adds attachment links to a given text and attachment set" do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.FederatorTest do
+ alias Pleroma.Instances
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.Federator
- alias Pleroma.Instances
use Pleroma.DataCase
import Pleroma.Factory
import Mock
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Instances.InstanceTest do
- alias Pleroma.Repo
alias Pleroma.Instances.Instance
+ alias Pleroma.Repo
use Pleroma.DataCase
defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
use Pleroma.DataCase
import Pleroma.Factory
- alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.User
+ alias Pleroma.Web.MastodonAPI.AccountView
test "Represent a user account" do
source_data = %{
defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
use Pleroma.Web.ConnCase
- alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.Repo
- alias Pleroma.User
- alias Pleroma.Object
+ alias Ecto.Changeset
alias Pleroma.Activity
alias Pleroma.Notification
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.CommonAPI
+ alias Pleroma.Object
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.FilterView
- alias Ecto.Changeset
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.TwitterAPI.TwitterAPI
import Pleroma.Factory
import ExUnit.CaptureLog
import Tesla.Mock
defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
use Pleroma.DataCase
+ alias Pleroma.Activity
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.StatusView
- alias Pleroma.User
alias Pleroma.Web.OStatus
- alias Pleroma.Web.CommonAPI
- alias Pleroma.Web.ActivityPub.ActivityPub
- alias Pleroma.Activity
import Pleroma.Factory
import Tesla.Mock
defmodule Pleroma.Web.OAuth.AuthorizationTest do
use Pleroma.DataCase
- alias Pleroma.Web.OAuth.Authorization
alias Pleroma.Web.OAuth.App
+ alias Pleroma.Web.OAuth.Authorization
import Pleroma.Factory
setup do
defmodule Pleroma.Web.OAuth.TokenTest do
use Pleroma.DataCase
+ alias Pleroma.Repo
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
alias Pleroma.Web.OAuth.Token
- alias Pleroma.Repo
import Pleroma.Factory
defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
use Pleroma.DataCase
- alias Pleroma.Web.OStatus.ActivityRepresenter
alias Pleroma.Activity
- alias Pleroma.User
alias Pleroma.Object
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.OStatus
+ alias Pleroma.Web.OStatus.ActivityRepresenter
import Pleroma.Factory
import Tesla.Mock
use Pleroma.DataCase
import Pleroma.Factory
alias Pleroma.User
+ alias Pleroma.Web.OStatus
alias Pleroma.Web.OStatus.ActivityRepresenter
alias Pleroma.Web.OStatus.FeedRepresenter
alias Pleroma.Web.OStatus.UserRepresenter
- alias Pleroma.Web.OStatus
test "returns a feed of the last 20 items of the user" do
note_activity = insert(:note_activity)
import Pleroma.Factory
import Tesla.Mock
- alias Pleroma.Repo
alias Pleroma.Activity
alias Pleroma.Object
+ alias Pleroma.Repo
alias Pleroma.Web.OStatus
setup do
defmodule Pleroma.Web.OStatus.OStatusControllerTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- alias Pleroma.User
- alias Pleroma.Repo
alias Pleroma.Object
+ alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.OStatus.ActivityRepresenter
defmodule Pleroma.Web.OStatusTest do
use Pleroma.DataCase
- alias Pleroma.Web.OStatus
- alias Pleroma.Web.XML
+ alias Pleroma.Activity
+ alias Pleroma.Instances
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.User
- alias Pleroma.Activity
- alias Pleroma.Instances
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.XML
import Pleroma.Factory
import ExUnit.CaptureLog
defmodule Pleroma.Web.Salmon.SalmonTest do
use Pleroma.DataCase
- alias Pleroma.Web.Salmon
alias Pleroma.Activity
alias Pleroma.Repo
alias Pleroma.User
+ alias Pleroma.Web.Salmon
import Pleroma.Factory
@magickey "RSA.pu0s-halox4tu7wmES1FVSx6u-4wc0YrUFXcqWXZG4-27UmbCOpMQftRCldNRfyA-qLbz-eqiwQhh-1EwUvjsD4cYbAHNGHwTvDOyx5AKthQUP44ykPv7kjKGh3DWKySJvcs9tlUG87hlo7AvnMo9pwRS_Zz2CacQ-MKaXyDepk=.AQAB"
defmodule Pleroma.Web.StreamerTest do
use Pleroma.DataCase
- alias Pleroma.Web.Streamer
alias Pleroma.List
alias Pleroma.User
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.Streamer
import Pleroma.Factory
test "it sends to public" do
defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
use Pleroma.DataCase
- alias Pleroma.User
alias Pleroma.Activity
alias Pleroma.Object
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter
alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
- alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.UserView
import Pleroma.Factory
defmodule Pleroma.Web.TwitterAPI.ControllerTest do
use Pleroma.Web.ConnCase
- alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter
+ alias Comeonin.Pbkdf2
+ alias Ecto.Changeset
+ alias Pleroma.Activity
alias Pleroma.Builders.ActivityBuilder
alias Pleroma.Builders.UserBuilder
+ alias Pleroma.Notification
+ alias Pleroma.Object
alias Pleroma.Repo
- alias Pleroma.Activity
alias Pleroma.User
- alias Pleroma.Object
- alias Pleroma.Notification
alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.OAuth.Token
alias Pleroma.Web.TwitterAPI.Controller
- alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.TwitterAPI.NotificationView
- alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter
alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Comeonin.Pbkdf2
- alias Ecto.Changeset
+ alias Pleroma.Web.TwitterAPI.UserView
import Pleroma.Factory
import Mock
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
use Pleroma.DataCase
- alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Activity
- alias Pleroma.User
alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.User
alias Pleroma.UserInviteToken
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.ActivityView
+ alias Pleroma.Web.TwitterAPI.TwitterAPI
+ alias Pleroma.Web.TwitterAPI.UserView
import Pleroma.Factory
defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
use Pleroma.DataCase
+ alias Pleroma.Activity
+ alias Pleroma.Repo
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.TwitterAPI.ActivityView
- alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.Repo
- alias Pleroma.Activity
- alias Pleroma.User
- alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.TwitterAPI.UserView
import Pleroma.Factory
import Tesla.Mock
defmodule Pleroma.Web.TwitterAPI.NotificationViewTest do
use Pleroma.DataCase
- alias Pleroma.User
alias Pleroma.Notification
- alias Pleroma.Web.TwitterAPI.TwitterAPI
+ alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.CommonAPI.Utils
+ alias Pleroma.Web.TwitterAPI.ActivityView
alias Pleroma.Web.TwitterAPI.NotificationView
+ alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.TwitterAPI.UserView
- alias Pleroma.Web.TwitterAPI.ActivityView
- alias Pleroma.Web.CommonAPI.Utils
- alias Pleroma.Web.ActivityPub.ActivityPub
import Pleroma.Factory
use Pleroma.DataCase
alias Pleroma.User
- alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.CommonAPI.Utils
+ alias Pleroma.Web.TwitterAPI.UserView
import Pleroma.Factory
defmodule Pleroma.Web.Websub.WebsubControllerTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- alias Pleroma.Web.Websub.WebsubClientSubscription
alias Pleroma.Activity
alias Pleroma.Repo
alias Pleroma.Web.Websub
+ alias Pleroma.Web.Websub.WebsubClientSubscription
test "websub subscription request", %{conn: conn} do
user = insert(:user)
defmodule Pleroma.Web.WebsubTest do
use Pleroma.DataCase
+
+ alias Pleroma.Web.Router.Helpers
alias Pleroma.Web.Websub
- alias Pleroma.Web.Websub.WebsubServerSubscription
alias Pleroma.Web.Websub.WebsubClientSubscription
+ alias Pleroma.Web.Websub.WebsubServerSubscription
+
import Pleroma.Factory
- alias Pleroma.Web.Router.Helpers
import Tesla.Mock
setup do