From 6a6a5b3251f7137e30b687a9a8448e678446f8b0 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 9 Feb 2019 16:16:26 +0100 Subject: [PATCH] de-group alias/es --- lib/mix/tasks/pleroma/uploads.ex | 3 +- lib/mix/tasks/pleroma/user.ex | 3 +- lib/pleroma/PasswordResetToken.ex | 4 ++- lib/pleroma/activity.ex | 6 +++- lib/pleroma/captcha/captcha.ex | 3 +- lib/pleroma/emails/user_email.ex | 3 +- lib/pleroma/filter.ex | 8 +++-- lib/pleroma/formatter.ex | 4 ++- lib/pleroma/gopher/server.ex | 5 ++- lib/pleroma/instances/instance.ex | 3 +- lib/pleroma/list.ex | 9 +++-- lib/pleroma/notification.ex | 7 +++- lib/pleroma/object.ex | 11 ++++-- lib/pleroma/plugs/oauth_plug.ex | 8 ++--- lib/pleroma/plugs/user_fetcher_plug.ex | 3 +- lib/pleroma/stats.ex | 3 +- lib/pleroma/user.ex | 18 +++++++--- lib/pleroma/user_invite_token.ex | 3 +- lib/pleroma/web/activity_pub/activity_pub.ex | 15 ++++++-- .../activity_pub/activity_pub_controller.ex | 12 +++++-- lib/pleroma/web/activity_pub/relay.ex | 4 ++- .../web/activity_pub/transmogrifier.ex | 8 +++-- lib/pleroma/web/activity_pub/utils.ex | 12 +++++-- .../web/activity_pub/views/object_view.ex | 3 +- .../web/activity_pub/views/user_view.ex | 10 ++++-- lib/pleroma/web/common_api/common_api.ex | 8 +++-- lib/pleroma/web/common_api/utils.ex | 11 ++++-- lib/pleroma/web/federator/federator.ex | 12 +++++-- .../web/http_signatures/http_signatures.ex | 3 +- .../mastodon_api/mastodon_api_controller.ex | 35 ++++++++++++------- .../web/mastodon_api/views/account_view.ex | 3 +- .../web/mastodon_api/views/status_view.ex | 8 +++-- .../web/mastodon_api/websocket_handler.ex | 3 +- lib/pleroma/web/metadata/opengraph.ex | 7 ++-- .../web/nodeinfo/nodeinfo_controller.ex | 6 +++- lib/pleroma/web/oauth/authorization.ex | 6 ++-- lib/pleroma/web/oauth/oauth_controller.ex | 7 ++-- lib/pleroma/web/oauth/token.ex | 7 ++-- .../web/ostatus/activity_representer.ex | 5 ++- lib/pleroma/web/ostatus/feed_representer.ex | 6 ++-- .../web/ostatus/handlers/follow_handler.ex | 3 +- .../web/ostatus/handlers/note_handler.ex | 9 +++-- .../web/ostatus/handlers/unfollow_handler.ex | 3 +- lib/pleroma/web/ostatus/ostatus.ex | 17 ++++++--- lib/pleroma/web/ostatus/ostatus_controller.ex | 14 +++++--- lib/pleroma/web/push/push.ex | 3 +- lib/pleroma/web/push/subscription.ex | 5 ++- lib/pleroma/web/rich_media/helpers.ex | 4 ++- lib/pleroma/web/salmon/salmon.ex | 3 +- lib/pleroma/web/streamer.ex | 6 +++- .../controllers/util_controller.ex | 9 +++-- .../representers/activity_representer.ex | 10 ++++-- lib/pleroma/web/twitter_api/twitter_api.ex | 9 +++-- .../web/twitter_api/twitter_api_controller.ex | 14 ++++++-- .../web/twitter_api/views/activity_view.ex | 11 ++++-- .../twitter_api/views/notification_view.ex | 6 ++-- .../web/twitter_api/views/user_view.ex | 4 ++- lib/pleroma/web/web_finger/web_finger.ex | 7 ++-- lib/pleroma/web/websub/websub.ex | 10 ++++-- lib/pleroma/web/websub/websub_controller.ex | 6 ++-- 60 files changed, 328 insertions(+), 120 deletions(-) diff --git a/lib/mix/tasks/pleroma/uploads.ex b/lib/mix/tasks/pleroma/uploads.ex index 460fa161b..697ad1a7b 100644 --- a/lib/mix/tasks/pleroma/uploads.ex +++ b/lib/mix/tasks/pleroma/uploads.ex @@ -4,7 +4,8 @@ defmodule Mix.Tasks.Pleroma.Uploads do use Mix.Task - alias Pleroma.{Upload, Uploaders.Local} + alias Pleroma.Upload + alias Pleroma.Uploaders.Local alias Mix.Tasks.Pleroma.Common require Logger diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex index 5da3edfd2..037e44716 100644 --- a/lib/mix/tasks/pleroma/user.ex +++ b/lib/mix/tasks/pleroma/user.ex @@ -5,7 +5,8 @@ defmodule Mix.Tasks.Pleroma.User do use Mix.Task import Ecto.Changeset - alias Pleroma.{Repo, User} + alias Pleroma.Repo + alias Pleroma.User alias Mix.Tasks.Pleroma.Common @shortdoc "Manages Pleroma users" diff --git a/lib/pleroma/PasswordResetToken.ex b/lib/pleroma/PasswordResetToken.ex index c3c0384d2..750ddd3c0 100644 --- a/lib/pleroma/PasswordResetToken.ex +++ b/lib/pleroma/PasswordResetToken.ex @@ -7,7 +7,9 @@ defmodule Pleroma.PasswordResetToken do import Ecto.Changeset - alias Pleroma.{User, PasswordResetToken, Repo} + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.PasswordResetToken schema "password_reset_tokens" do belongs_to(:user, User, type: Pleroma.FlakeId) diff --git a/lib/pleroma/activity.ex b/lib/pleroma/activity.ex index f0aa3ce97..cdfe7ea9e 100644 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@ -4,7 +4,11 @@ defmodule Pleroma.Activity do use Ecto.Schema - alias Pleroma.{Repo, Activity, Notification} + + alias Pleroma.Repo + alias Pleroma.Activity + alias Pleroma.Notification + import Ecto.Query @type t :: %__MODULE__{} diff --git a/lib/pleroma/captcha/captcha.ex b/lib/pleroma/captcha/captcha.ex index f70f5a191..aa41acd1a 100644 --- a/lib/pleroma/captcha/captcha.ex +++ b/lib/pleroma/captcha/captcha.ex @@ -3,8 +3,9 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Captcha do - alias Plug.Crypto.{KeyGenerator, MessageEncryptor} alias Calendar.DateTime + alias Plug.Crypto.KeyGenerator + alias Plug.Crypto.MessageEncryptor use GenServer diff --git a/lib/pleroma/emails/user_email.ex b/lib/pleroma/emails/user_email.ex index c42c53c99..a3a09e96c 100644 --- a/lib/pleroma/emails/user_email.ex +++ b/lib/pleroma/emails/user_email.ex @@ -7,7 +7,8 @@ defmodule Pleroma.UserEmail do import Swoosh.Email - alias Pleroma.Web.{Endpoint, Router} + alias Pleroma.Web.Endpoint + alias Pleroma.Web.Router defp instance_config, do: Pleroma.Config.get(:instance) diff --git a/lib/pleroma/filter.ex b/lib/pleroma/filter.ex index 308bd70e1..bdc34698c 100644 --- a/lib/pleroma/filter.ex +++ b/lib/pleroma/filter.ex @@ -4,8 +4,12 @@ defmodule Pleroma.Filter do use Ecto.Schema - import Ecto.{Changeset, Query} - alias Pleroma.{User, Repo} + + import Ecto.Changeset + import Ecto.Query + + alias Pleroma.User + alias Pleroma.Repo schema "filters" do belongs_to(:user, User, type: Pleroma.FlakeId) diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 8a8af266c..f31aafa0d 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -3,7 +3,9 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Formatter do - alias Pleroma.{Emoji, HTML, User} + alias Pleroma.Emoji + alias Pleroma.HTML + alias Pleroma.User alias Pleroma.Web.MediaProxy @tag_regex ~r/((?<=[^&])|\A)(\#)(\w+)/u diff --git a/lib/pleroma/gopher/server.ex b/lib/pleroma/gopher/server.ex index a284b3c61..32cb817d2 100644 --- a/lib/pleroma/gopher/server.ex +++ b/lib/pleroma/gopher/server.ex @@ -37,7 +37,10 @@ def init([ip, port]) do defmodule Pleroma.Gopher.Server.ProtocolHandler do alias Pleroma.Web.ActivityPub.ActivityPub - alias Pleroma.{Activity, HTML, User, Repo} + alias Pleroma.Activity + alias Pleroma.HTML + alias Pleroma.User + alias Pleroma.Repo def start_link(ref, socket, transport, opts) do pid = spawn_link(__MODULE__, :init, [ref, socket, transport, opts]) diff --git a/lib/pleroma/instances/instance.ex b/lib/pleroma/instances/instance.ex index bab8e0564..ce3b46d50 100644 --- a/lib/pleroma/instances/instance.ex +++ b/lib/pleroma/instances/instance.ex @@ -1,7 +1,8 @@ defmodule Pleroma.Instances.Instance do @moduledoc "Instance." - alias Pleroma.{Instances, Repo} + alias Pleroma.Instances + alias Pleroma.Repo alias Pleroma.Instances.Instance use Ecto.Schema diff --git a/lib/pleroma/list.ex b/lib/pleroma/list.ex index ca66c6916..55c4cf6df 100644 --- a/lib/pleroma/list.ex +++ b/lib/pleroma/list.ex @@ -4,8 +4,13 @@ defmodule Pleroma.List do use Ecto.Schema - import Ecto.{Changeset, Query} - alias Pleroma.{User, Repo, Activity} + + import Ecto.Query + import Ecto.Changeset + + alias Pleroma.Activity + alias Pleroma.Repo + alias Pleroma.User schema "lists" do belongs_to(:user, User, type: Pleroma.FlakeId) diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 2364d36da..c7c925c89 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -4,8 +4,13 @@ defmodule Pleroma.Notification do use Ecto.Schema - alias Pleroma.{User, Activity, Notification, Repo} + + alias Pleroma.User + alias Pleroma.Activity + alias Pleroma.Notification + alias Pleroma.Repo alias Pleroma.Web.CommonAPI.Utils + import Ecto.Query schema "notifications" do diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 7b46a3b05..5f1fc801b 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -4,8 +4,15 @@ defmodule Pleroma.Object do use Ecto.Schema - alias Pleroma.{Repo, Object, User, Activity, ObjectTombstone} - import Ecto.{Query, Changeset} + + alias Pleroma.Repo + alias Pleroma.Object + alias Pleroma.User + alias Pleroma.Activity + alias Pleroma.ObjectTombstone + + import Ecto.Query + import Ecto.Changeset schema "objects" do field(:data, :map) diff --git a/lib/pleroma/plugs/oauth_plug.ex b/lib/pleroma/plugs/oauth_plug.ex index 945a1d49f..22f0406f4 100644 --- a/lib/pleroma/plugs/oauth_plug.ex +++ b/lib/pleroma/plugs/oauth_plug.ex @@ -6,11 +6,9 @@ defmodule Pleroma.Plugs.OAuthPlug do import Plug.Conn import Ecto.Query - alias Pleroma.{ - User, - Repo, - Web.OAuth.Token - } + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.Web.OAuth.Token @realm_reg Regex.compile!("Bearer\:?\s+(.*)$", "i") diff --git a/lib/pleroma/plugs/user_fetcher_plug.ex b/lib/pleroma/plugs/user_fetcher_plug.ex index 6d6ab0926..7ed4602bb 100644 --- a/lib/pleroma/plugs/user_fetcher_plug.ex +++ b/lib/pleroma/plugs/user_fetcher_plug.ex @@ -3,7 +3,8 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Plugs.UserFetcherPlug do - alias Pleroma.{User, Repo} + alias Pleroma.User + alias Pleroma.Repo import Plug.Conn diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index 16cc2856a..fe0ce9051 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -4,7 +4,8 @@ defmodule Pleroma.Stats do import Ecto.Query - alias Pleroma.{User, Repo} + alias Pleroma.User + alias Pleroma.Repo def start_link do agent = Agent.start_link(fn -> {[], %{}} end, name: __MODULE__) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 33630ac7c..b44ba1279 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -5,13 +5,23 @@ defmodule Pleroma.User do use Ecto.Schema - import Ecto.{Changeset, Query} - alias Pleroma.{Repo, User, Object, Web, Activity, Notification} + import Ecto.Changeset + import Ecto.Query + + 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.CommonAPI.Utils, as: CommonUtils - alias Pleroma.Web.{OStatus, Websub, OAuth} - alias Pleroma.Web.ActivityPub.{Utils, ActivityPub} + alias Pleroma.Web.OStatus + alias Pleroma.Web.Websub + alias Pleroma.Web.OAuth + alias Pleroma.Web.ActivityPub.Utils + alias Pleroma.Web.ActivityPub.ActivityPub require Logger diff --git a/lib/pleroma/user_invite_token.ex b/lib/pleroma/user_invite_token.ex index 8e449444c..5a448114c 100644 --- a/lib/pleroma/user_invite_token.ex +++ b/lib/pleroma/user_invite_token.ex @@ -7,7 +7,8 @@ defmodule Pleroma.UserInviteToken do import Ecto.Changeset - alias Pleroma.{UserInviteToken, Repo} + alias Pleroma.UserInviteToken + alias Pleroma.Repo schema "user_invite_tokens" do field(:token, :string) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index d22f04bb2..c46d8233e 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -3,9 +3,18 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.ActivityPub.ActivityPub do - alias Pleroma.{Activity, Repo, Object, Upload, User, Notification, Instances} - alias Pleroma.Web.ActivityPub.{Transmogrifier, MRF} - alias Pleroma.Web.{WebFinger, Federator, OStatus} + alias Pleroma.Activity + alias Pleroma.Repo + alias Pleroma.Object + 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.Federator + alias Pleroma.Web.OStatus import Ecto.Query import Pleroma.Web.ActivityPub.Utils diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index 01b521051..69879476e 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -5,9 +5,15 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do use Pleroma.Web, :controller - alias Pleroma.{Activity, User, Object} - alias Pleroma.Web.ActivityPub.{ObjectView, UserView} - alias Pleroma.Web.ActivityPub.{ActivityPub, Relay, Transmogrifier, Utils} + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Object + alias Pleroma.Web.ActivityPub.ObjectView + alias Pleroma.Web.ActivityPub.UserView + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Relay + alias Pleroma.Web.ActivityPub.Transmogrifier + alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.Federator require Logger diff --git a/lib/pleroma/web/activity_pub/relay.ex b/lib/pleroma/web/activity_pub/relay.ex index c0a52e349..c496063ea 100644 --- a/lib/pleroma/web/activity_pub/relay.ex +++ b/lib/pleroma/web/activity_pub/relay.ex @@ -3,7 +3,9 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.ActivityPub.Relay do - alias Pleroma.{User, Object, Activity} + alias Pleroma.User + alias Pleroma.Object + alias Pleroma.Activity alias Pleroma.Web.ActivityPub.ActivityPub require Logger diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index edfbc9bb2..98a2af819 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -6,8 +6,12 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do @moduledoc """ A module to handle coding from internal to wire ActivityPub and back. """ - alias Pleroma.{Activity, User, Object, Repo} - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Object + alias Pleroma.Repo + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Utils import Ecto.Query diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 4a2cc6738..964e11c9d 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -3,11 +3,19 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.ActivityPub.Utils do - alias Pleroma.{Repo, Web, Object, Activity, User, Notification} + alias Pleroma.Repo + alias Pleroma.Web + alias Pleroma.Object + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Notification alias Pleroma.Web.Router.Helpers alias Pleroma.Web.Endpoint - alias Ecto.{Changeset, UUID} + alias Ecto.Changeset + alias Ecto.UUID + import Ecto.Query + require Logger @supported_object_types ["Article", "Note", "Video", "Page"] diff --git a/lib/pleroma/web/activity_pub/views/object_view.ex b/lib/pleroma/web/activity_pub/views/object_view.ex index 394d82fbc..84fa94e32 100644 --- a/lib/pleroma/web/activity_pub/views/object_view.ex +++ b/lib/pleroma/web/activity_pub/views/object_view.ex @@ -4,7 +4,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do use Pleroma.Web, :view - alias Pleroma.{Object, Activity} + alias Pleroma.Activity + alias Pleroma.Object alias Pleroma.Web.ActivityPub.Transmogrifier def render("object.json", %{object: %Object{} = object}) do diff --git a/lib/pleroma/web/activity_pub/views/user_view.ex b/lib/pleroma/web/activity_pub/views/user_view.ex index ba3aea1a6..15e6c1f68 100644 --- a/lib/pleroma/web/activity_pub/views/user_view.ex +++ b/lib/pleroma/web/activity_pub/views/user_view.ex @@ -5,9 +5,13 @@ defmodule Pleroma.Web.ActivityPub.UserView do use Pleroma.Web, :view - alias Pleroma.Web.{WebFinger, Salmon} - alias Pleroma.{User, Repo} - alias Pleroma.Web.ActivityPub.{ActivityPub, Transmogrifier, Utils} + alias Pleroma.Web.WebFinger + alias Pleroma.Web.Salmon + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Transmogrifier + alias Pleroma.Web.ActivityPub.Utils import Ecto.Query diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 4388396cf..c0d6fb5c4 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -3,8 +3,12 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.CommonAPI do - alias Pleroma.{User, Repo, Activity, Object} - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.Activity + alias Pleroma.Object + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Formatter import Pleroma.Web.CommonAPI.Utils diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index e50d63d77..123107b56 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -5,9 +5,14 @@ defmodule Pleroma.Web.CommonAPI.Utils do alias Calendar.Strftime alias Comeonin.Pbkdf2 - alias Pleroma.{Activity, Formatter, Object, Repo} - alias Pleroma.{User, Web} - alias Pleroma.Web.{Endpoint, MediaProxy} + alias Pleroma.Activity + alias Pleroma.Formatter + alias Pleroma.Object + alias Pleroma.Repo + alias Pleroma.User + alias Pleroma.Web + alias Pleroma.Web.Endpoint + alias Pleroma.Web.MediaProxy alias Pleroma.Web.ActivityPub.Utils # This is a hack for twidere. diff --git a/lib/pleroma/web/federator/federator.ex b/lib/pleroma/web/federator/federator.ex index 3e8469a6f..468959a65 100644 --- a/lib/pleroma/web/federator/federator.ex +++ b/lib/pleroma/web/federator/federator.ex @@ -5,9 +5,15 @@ defmodule Pleroma.Web.Federator do use GenServer - alias Pleroma.{Activity, User} - alias Pleroma.Web.{WebFinger, Websub, Salmon} - alias Pleroma.Web.ActivityPub.{ActivityPub, Relay, Transmogrifier, Utils} + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Web.WebFinger + alias Pleroma.Web.Websub + alias Pleroma.Web.Salmon + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Relay + alias Pleroma.Web.ActivityPub.Transmogrifier + alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.Federator.RetryQueue alias Pleroma.Web.OStatus diff --git a/lib/pleroma/web/http_signatures/http_signatures.ex b/lib/pleroma/web/http_signatures/http_signatures.ex index 5ff93663e..8e2e2a44b 100644 --- a/lib/pleroma/web/http_signatures/http_signatures.ex +++ b/lib/pleroma/web/http_signatures/http_signatures.ex @@ -5,7 +5,8 @@ # https://tools.ietf.org/html/draft-cavage-http-signatures-08 defmodule Pleroma.Web.HTTPSignatures do alias Pleroma.User - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Utils require Logger diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 74f1bed4d..06f870393 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -4,22 +4,31 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do use Pleroma.Web, :controller - alias Pleroma.{Activity, Config, Filter, Notification, Object, Repo, Stats, User} + alias Pleroma.Activity + alias Pleroma.Config + alias Pleroma.Filter + alias Pleroma.Notification + alias Pleroma.Object + alias Pleroma.Repo + alias Pleroma.Stats + alias Pleroma.User alias Pleroma.Web - alias Pleroma.Web.{CommonAPI, MediaProxy, Push} + alias Pleroma.Web.CommonAPI + alias Pleroma.Web.MediaProxy + alias Pleroma.Web.Push alias Push.Subscription - alias Pleroma.Web.MastodonAPI.{ - AccountView, - FilterView, - ListView, - MastodonView, - PushSubscriptionView, - StatusView - } - - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} - alias Pleroma.Web.OAuth.{App, Authorization, Token} + alias Pleroma.Web.MastodonAPI.AccountView + alias Pleroma.Web.MastodonAPI.FilterView + alias Pleroma.Web.MastodonAPI.ListView + alias Pleroma.Web.MastodonAPI.MastodonView + alias Pleroma.Web.MastodonAPI.PushSubscriptionView + alias Pleroma.Web.MastodonAPI.StatusView + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Utils + alias Pleroma.Web.OAuth.App + alias Pleroma.Web.OAuth.Authorization + alias Pleroma.Web.OAuth.Token import Ecto.Query require Logger diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 0235f5d5b..9df9f14b2 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -5,7 +5,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do use Pleroma.Web, :view - alias Pleroma.{HTML, User} + alias Pleroma.HTML + alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MastodonAPI.AccountView alias Pleroma.Web.MediaProxy diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index cd030fe54..f51a2ebb0 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -5,9 +5,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do use Pleroma.Web, :view - alias Pleroma.{Activity, HTML, Repo, User} + alias Pleroma.Activity + alias Pleroma.HTML + alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils - alias Pleroma.Web.MastodonAPI.{AccountView, StatusView} + alias Pleroma.Web.MastodonAPI.AccountView + alias Pleroma.Web.MastodonAPI.StatusView alias Pleroma.Web.MediaProxy # TODO: Add cached version. diff --git a/lib/pleroma/web/mastodon_api/websocket_handler.ex b/lib/pleroma/web/mastodon_api/websocket_handler.ex index ce42338a7..ea75070c4 100644 --- a/lib/pleroma/web/mastodon_api/websocket_handler.ex +++ b/lib/pleroma/web/mastodon_api/websocket_handler.ex @@ -6,7 +6,8 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do require Logger alias Pleroma.Web.OAuth.Token - alias Pleroma.{Repo, User} + alias Pleroma.Repo + alias Pleroma.User @behaviour :cowboy_websocket_handler diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex index 479c9d20d..190377767 100644 --- a/lib/pleroma/web/metadata/opengraph.ex +++ b/lib/pleroma/web/metadata/opengraph.ex @@ -3,8 +3,11 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.Metadata.Providers.OpenGraph do - alias Pleroma.{HTML, Formatter, User} - alias Pleroma.Web.{Metadata, MediaProxy} + alias Pleroma.HTML + alias Pleroma.Formatter + alias Pleroma.User + alias Pleroma.Web.Metadata + alias Pleroma.Web.MediaProxy alias Pleroma.Web.Metadata.Providers.Provider @behaviour Provider diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index e81de7bbd..c38827165 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -5,7 +5,11 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do use Pleroma.Web, :controller - alias Pleroma.{Config, Repo, Stats, User, Web} + alias Pleroma.Config + alias Pleroma.Repo + alias Pleroma.Stats + alias Pleroma.User + alias Pleroma.Web alias Pleroma.Web.ActivityPub.MRF plug(Pleroma.Web.FederatingPlug) diff --git a/lib/pleroma/web/oauth/authorization.ex b/lib/pleroma/web/oauth/authorization.ex index f8c65602d..ea742f678 100644 --- a/lib/pleroma/web/oauth/authorization.ex +++ b/lib/pleroma/web/oauth/authorization.ex @@ -5,8 +5,10 @@ defmodule Pleroma.Web.OAuth.Authorization do use Ecto.Schema - alias Pleroma.{User, Repo} - alias Pleroma.Web.OAuth.{Authorization, App} + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.Web.OAuth.Authorization + alias Pleroma.Web.OAuth.App import Ecto.{Changeset, Query} diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index 8ec963c79..e4d0601f8 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -5,8 +5,11 @@ defmodule Pleroma.Web.OAuth.OAuthController do use Pleroma.Web, :controller - alias Pleroma.Web.OAuth.{Authorization, Token, App} - alias Pleroma.{Repo, User} + alias Pleroma.Web.OAuth.Authorization + alias Pleroma.Web.OAuth.Token + alias Pleroma.Web.OAuth.App + alias Pleroma.Repo + alias Pleroma.User alias Comeonin.Pbkdf2 plug(:fetch_session) diff --git a/lib/pleroma/web/oauth/token.ex b/lib/pleroma/web/oauth/token.ex index 4e01b123b..b0bbeeb69 100644 --- a/lib/pleroma/web/oauth/token.ex +++ b/lib/pleroma/web/oauth/token.ex @@ -7,8 +7,11 @@ defmodule Pleroma.Web.OAuth.Token do import Ecto.Query - alias Pleroma.{User, Repo} - alias Pleroma.Web.OAuth.{Token, App, Authorization} + alias Pleroma.User + alias Pleroma.Repo + alias Pleroma.Web.OAuth.Token + alias Pleroma.Web.OAuth.App + alias Pleroma.Web.OAuth.Authorization schema "oauth_tokens" do field(:token, :string) diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 3d41fc708..9e1f24bc4 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -3,8 +3,11 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.OStatus.ActivityRepresenter do - alias Pleroma.{Activity, User, Object} + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Object alias Pleroma.Web.OStatus.UserRepresenter + require Logger defp get_href(id) do diff --git a/lib/pleroma/web/ostatus/feed_representer.ex b/lib/pleroma/web/ostatus/feed_representer.ex index fd530307c..025d4731c 100644 --- a/lib/pleroma/web/ostatus/feed_representer.ex +++ b/lib/pleroma/web/ostatus/feed_representer.ex @@ -4,8 +4,10 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do alias Pleroma.User - alias Pleroma.Web.{OStatus, MediaProxy} - alias Pleroma.Web.OStatus.{UserRepresenter, ActivityRepresenter} + alias Pleroma.Web.OStatus + alias Pleroma.Web.MediaProxy + alias Pleroma.Web.OStatus.ActivityRepresenter + alias Pleroma.Web.OStatus.UserRepresenter def to_simple_form(user, activities, _users) do most_recent_update = diff --git a/lib/pleroma/web/ostatus/handlers/follow_handler.ex b/lib/pleroma/web/ostatus/handlers/follow_handler.ex index becdf2fbf..91ad4bc40 100644 --- a/lib/pleroma/web/ostatus/handlers/follow_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/follow_handler.ex @@ -3,7 +3,8 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.OStatus.FollowHandler do - alias Pleroma.Web.{XML, OStatus} + alias Pleroma.Web.XML + alias Pleroma.Web.OStatus alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.User diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex index 5bbb86f87..c2e585cac 100644 --- a/lib/pleroma/web/ostatus/handlers/note_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/note_handler.ex @@ -4,9 +4,12 @@ defmodule Pleroma.Web.OStatus.NoteHandler do require Logger - alias Pleroma.Web.{XML, OStatus} - alias Pleroma.{Object, Activity} - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} + 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 @doc """ diff --git a/lib/pleroma/web/ostatus/handlers/unfollow_handler.ex b/lib/pleroma/web/ostatus/handlers/unfollow_handler.ex index 1c64f3c3d..c9085894d 100644 --- a/lib/pleroma/web/ostatus/handlers/unfollow_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/unfollow_handler.ex @@ -3,7 +3,8 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.OStatus.UnfollowHandler do - alias Pleroma.Web.{XML, OStatus} + alias Pleroma.Web.XML + alias Pleroma.Web.OStatus alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.User diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index e1213923e..b4f5761ac 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -9,10 +9,19 @@ defmodule Pleroma.Web.OStatus do import Pleroma.Web.XML require Logger - alias Pleroma.{Repo, User, Web, Object, Activity} - alias Pleroma.Web.ActivityPub.{ActivityPub, Transmogrifier} - alias Pleroma.Web.{WebFinger, Websub} - alias Pleroma.Web.OStatus.{FollowHandler, UnfollowHandler, NoteHandler, DeleteHandler} + 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.FollowHandler + alias Pleroma.Web.OStatus.UnfollowHandler + alias Pleroma.Web.OStatus.NoteHandler + alias Pleroma.Web.OStatus.DeleteHandler def is_representable?(%Activity{data: data}) do object = Object.normalize(data["object"]) diff --git a/lib/pleroma/web/ostatus/ostatus_controller.ex b/lib/pleroma/web/ostatus/ostatus_controller.ex index ed0df620b..db4c8f4da 100644 --- a/lib/pleroma/web/ostatus/ostatus_controller.ex +++ b/lib/pleroma/web/ostatus/ostatus_controller.ex @@ -5,10 +5,16 @@ defmodule Pleroma.Web.OStatus.OStatusController do use Pleroma.Web, :controller - alias Pleroma.{Activity, Object, User} - alias Pleroma.Web.ActivityPub.{ActivityPub, ActivityPubController, ObjectView} - alias Pleroma.Web.OStatus.{ActivityRepresenter, FeedRepresenter} - alias Pleroma.Web.{Federator, OStatus} + alias Pleroma.Activity + alias Pleroma.Object + alias Pleroma.User + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.ActivityPubController + alias Pleroma.Web.ActivityPub.ObjectView + alias Pleroma.Web.OStatus.ActivityRepresenter + alias Pleroma.Web.OStatus.FeedRepresenter + alias Pleroma.Web.Federator + alias Pleroma.Web.OStatus alias Pleroma.Web.XML plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming]) diff --git a/lib/pleroma/web/push/push.ex b/lib/pleroma/web/push/push.ex index ffd2aac91..ddd4fe037 100644 --- a/lib/pleroma/web/push/push.ex +++ b/lib/pleroma/web/push/push.ex @@ -5,7 +5,8 @@ defmodule Pleroma.Web.Push do use GenServer - alias Pleroma.{Repo, User} + alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.Push.Subscription require Logger diff --git a/lib/pleroma/web/push/subscription.ex b/lib/pleroma/web/push/subscription.ex index bd9d9f3a7..242e30910 100644 --- a/lib/pleroma/web/push/subscription.ex +++ b/lib/pleroma/web/push/subscription.ex @@ -4,8 +4,11 @@ defmodule Pleroma.Web.Push.Subscription do use Ecto.Schema + import Ecto.Changeset - alias Pleroma.{Repo, User} + + alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.OAuth.Token alias Pleroma.Web.Push.Subscription diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex index 521fa7ee0..abb1cf7f2 100644 --- a/lib/pleroma/web/rich_media/helpers.ex +++ b/lib/pleroma/web/rich_media/helpers.ex @@ -3,7 +3,9 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.RichMedia.Helpers do - alias Pleroma.{Activity, Object, HTML} + alias Pleroma.Activity + alias Pleroma.Object + alias Pleroma.HTML alias Pleroma.Web.RichMedia.Parser def fetch_data_for_activity(%Activity{} = activity) do diff --git a/lib/pleroma/web/salmon/salmon.ex b/lib/pleroma/web/salmon/salmon.ex index fb08d645b..a5a9e16c6 100644 --- a/lib/pleroma/web/salmon/salmon.ex +++ b/lib/pleroma/web/salmon/salmon.ex @@ -7,7 +7,8 @@ defmodule Pleroma.Web.Salmon do use Bitwise - alias Pleroma.{Instances, User} + alias Pleroma.Instances + alias Pleroma.User alias Pleroma.Web.XML alias Pleroma.Web.OStatus.ActivityRepresenter diff --git a/lib/pleroma/web/streamer.ex b/lib/pleroma/web/streamer.ex index 978c77e57..4de7608e4 100644 --- a/lib/pleroma/web/streamer.ex +++ b/lib/pleroma/web/streamer.ex @@ -5,7 +5,11 @@ defmodule Pleroma.Web.Streamer do use GenServer require Logger - alias Pleroma.{User, Notification, Activity, Object, Repo} + alias Pleroma.User + alias Pleroma.Notification + alias Pleroma.Activity + alias Pleroma.Object + alias Pleroma.Repo alias Pleroma.Web.ActivityPub.ActivityPub @keepalive_interval :timer.seconds(30) diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index bf8d7e5aa..e2fdedb25 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -8,9 +8,14 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do require Logger alias Comeonin.Pbkdf2 - alias Pleroma.{Emoji, PasswordResetToken, User, Repo} + alias Pleroma.Emoji + alias Pleroma.PasswordResetToken + alias Pleroma.User + alias Pleroma.Repo alias Pleroma.Web - alias Pleroma.Web.{CommonAPI, OStatus, WebFinger} + 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 diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index a5fec88f7..192ab7334 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -2,13 +2,19 @@ # Copyright © 2017-2019 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only +# FIXME: Remove this module? # THIS MODULE IS DEPRECATED! DON'T USE IT! # USE THE Pleroma.Web.TwitterAPI.Views.ActivityView MODULE! defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do use Pleroma.Web.TwitterAPI.Representers.BaseRepresenter alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter - alias Pleroma.{Activity, Formatter, HTML, User} - alias Pleroma.Web.TwitterAPI.{ActivityView, TwitterAPI, UserView} + alias Pleroma.Activity + alias Pleroma.Formatter + alias Pleroma.HTML + alias Pleroma.User + alias Pleroma.Web.TwitterAPI.ActivityView + alias Pleroma.Web.TwitterAPI.TwitterAPI + alias Pleroma.Web.TwitterAPI.UserView alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MastodonAPI.StatusView diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index 7d00c01a1..db521a3ad 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -3,8 +3,13 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.TwitterAPI.TwitterAPI do - alias Pleroma.{UserInviteToken, User, Activity, Repo, Object} - alias Pleroma.{UserEmail, Mailer} + alias Pleroma.UserInviteToken + alias Pleroma.User + alias Pleroma.Activity + alias Pleroma.Repo + alias Pleroma.Object + alias Pleroma.UserEmail + alias Pleroma.Mailer alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.TwitterAPI.UserView alias Pleroma.Web.CommonAPI diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index c0081bf6e..c2f0dc2a9 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -8,10 +8,18 @@ defmodule Pleroma.Web.TwitterAPI.Controller do import Pleroma.Web.ControllerHelper, only: [json_response: 3] alias Ecto.Changeset - alias Pleroma.Web.ActivityPub.{ActivityPub, Utils} + alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.CommonAPI - alias Pleroma.Web.TwitterAPI.{ActivityView, NotificationView, TwitterAPI, UserView} - alias Pleroma.{Activity, Object, Notification, Repo, User} + alias Pleroma.Web.TwitterAPI.ActivityView + alias Pleroma.Web.TwitterAPI.NotificationView + 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 require Logger diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex index dbcb732fe..661022afa 100644 --- a/lib/pleroma/web/twitter_api/views/activity_view.ex +++ b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -4,10 +4,17 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do use Pleroma.Web, :view - alias Pleroma.{Activity, Formatter, HTML, Object, Repo, User} + alias Pleroma.Activity + alias Pleroma.Formatter + alias Pleroma.HTML + alias Pleroma.Object + alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MastodonAPI.StatusView - alias Pleroma.Web.TwitterAPI.{ActivityView, TwitterAPI, UserView} + alias Pleroma.Web.TwitterAPI.ActivityView + alias Pleroma.Web.TwitterAPI.TwitterAPI + alias Pleroma.Web.TwitterAPI.UserView alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter import Ecto.Query diff --git a/lib/pleroma/web/twitter_api/views/notification_view.ex b/lib/pleroma/web/twitter_api/views/notification_view.ex index 414ed4731..e7c7a7496 100644 --- a/lib/pleroma/web/twitter_api/views/notification_view.ex +++ b/lib/pleroma/web/twitter_api/views/notification_view.ex @@ -4,9 +4,11 @@ defmodule Pleroma.Web.TwitterAPI.NotificationView do use Pleroma.Web, :view - alias Pleroma.{Notification, User} + alias Pleroma.Notification + alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils - alias Pleroma.Web.TwitterAPI.{ActivityView, UserView} + alias Pleroma.Web.TwitterAPI.ActivityView + alias Pleroma.Web.TwitterAPI.UserView defp get_user(ap_id, opts) do cond do diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex index 3cde3bc1b..a09450df7 100644 --- a/lib/pleroma/web/twitter_api/views/user_view.ex +++ b/lib/pleroma/web/twitter_api/views/user_view.ex @@ -4,7 +4,9 @@ defmodule Pleroma.Web.TwitterAPI.UserView do use Pleroma.Web, :view - alias Pleroma.{Formatter, HTML, User} + alias Pleroma.Formatter + alias Pleroma.HTML + alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MediaProxy diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index 0a6338312..5ea5ae48e 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -5,9 +5,12 @@ defmodule Pleroma.Web.WebFinger do @httpoison Application.get_env(:pleroma, :httpoison) - alias Pleroma.{User, XmlBuilder} + alias Pleroma.User + alias Pleroma.XmlBuilder alias Pleroma.Web - alias Pleroma.Web.{XML, Salmon, OStatus} + alias Pleroma.Web.XML + alias Pleroma.Web.Salmon + alias Pleroma.Web.OStatus require Jason require Logger diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex index de6508f52..a08d7993d 100644 --- a/lib/pleroma/web/websub/websub.ex +++ b/lib/pleroma/web/websub/websub.ex @@ -4,10 +4,14 @@ defmodule Pleroma.Web.Websub do alias Ecto.Changeset - alias Pleroma.{Instances, Repo} - alias Pleroma.Web.Websub.{WebsubServerSubscription, WebsubClientSubscription} + 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, Endpoint, OStatus} + alias Pleroma.Web.XML + alias Pleroma.Web.Endpoint + alias Pleroma.Web.OStatus alias Pleroma.Web.Router.Helpers require Logger diff --git a/lib/pleroma/web/websub/websub_controller.ex b/lib/pleroma/web/websub/websub_controller.ex index a92dfe87b..1ad18a8a4 100644 --- a/lib/pleroma/web/websub/websub_controller.ex +++ b/lib/pleroma/web/websub/websub_controller.ex @@ -5,8 +5,10 @@ defmodule Pleroma.Web.Websub.WebsubController do use Pleroma.Web, :controller - alias Pleroma.{Repo, User} - alias Pleroma.Web.{Websub, Federator} + alias Pleroma.Repo + alias Pleroma.User + alias Pleroma.Web.Websub + alias Pleroma.Web.Federator alias Pleroma.Web.Websub.WebsubClientSubscription require Logger