Browse Source

Credo fixes: alias grouping/ordering

tags/v1.1.4
Haelwenn (lanodan) Monnier 5 years ago
parent
commit
60ea29dfe6
No known key found for this signature in database GPG Key ID: D5B7A8E43C997DEE
28 changed files with 57 additions and 98 deletions
  1. +1
    -2
      lib/pleroma/captcha/captcha.ex
  2. +1
    -3
      lib/pleroma/formatter.ex
  3. +1
    -4
      lib/pleroma/gopher/server.ex
  4. +1
    -0
      lib/pleroma/html.ex
  5. +1
    -3
      lib/pleroma/instances/instance.ex
  6. +2
    -2
      lib/pleroma/plugs/user_fetcher_plug.ex
  7. +1
    -2
      lib/pleroma/user_invite_token.ex
  8. +3
    -3
      lib/pleroma/web/activity_pub/activity_pub.ex
  9. +1
    -4
      lib/pleroma/web/activity_pub/activity_pub_controller.ex
  10. +2
    -6
      lib/pleroma/web/activity_pub/transmogrifier.ex
  11. +5
    -7
      lib/pleroma/web/activity_pub/views/user_view.ex
  12. +1
    -2
      lib/pleroma/web/common_api/common_api.ex
  13. +1
    -2
      lib/pleroma/web/common_api/utils.ex
  14. +4
    -6
      lib/pleroma/web/federator/federator.ex
  15. +2
    -2
      lib/pleroma/web/http_signatures/http_signatures.ex
  16. +2
    -3
      lib/pleroma/web/metadata/opengraph.ex
  17. +2
    -3
      lib/pleroma/web/ostatus/feed_representer.ex
  18. +1
    -2
      lib/pleroma/web/ostatus/handlers/note_handler.ex
  19. +1
    -2
      lib/pleroma/web/ostatus/ostatus.ex
  20. +4
    -6
      lib/pleroma/web/ostatus/ostatus_controller.ex
  21. +3
    -2
      lib/pleroma/web/salmon/salmon.ex
  22. +5
    -5
      lib/pleroma/web/twitter_api/controllers/util_controller.ex
  23. +2
    -4
      lib/pleroma/web/twitter_api/representers/activity_representer.ex
  24. +4
    -5
      lib/pleroma/web/twitter_api/twitter_api_controller.ex
  25. +3
    -11
      lib/pleroma/web/twitter_api/views/activity_view.ex
  26. +1
    -2
      lib/pleroma/web/twitter_api/views/notification_view.ex
  27. +1
    -3
      lib/pleroma/web/twitter_api/views/user_view.ex
  28. +1
    -2
      lib/pleroma/web/websub/websub.ex

+ 1
- 2
lib/pleroma/captcha/captcha.ex View File

@@ -3,8 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only


defmodule Pleroma.Captcha do defmodule Pleroma.Captcha do
alias Plug.Crypto.KeyGenerator
alias Plug.Crypto.MessageEncryptor
alias Plug.Crypto.{KeyGenerator, MessageEncryptor}
alias Calendar.DateTime alias Calendar.DateTime


use GenServer use GenServer


+ 1
- 3
lib/pleroma/formatter.ex View File

@@ -3,10 +3,8 @@
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only


defmodule Pleroma.Formatter do defmodule Pleroma.Formatter do
alias Pleroma.User
alias Pleroma.{Emoji, HTML, User}
alias Pleroma.Web.MediaProxy alias Pleroma.Web.MediaProxy
alias Pleroma.HTML
alias Pleroma.Emoji


@tag_regex ~r/((?<=[^&])|\A)(\#)(\w+)/u @tag_regex ~r/((?<=[^&])|\A)(\#)(\w+)/u
@markdown_characters_regex ~r/(`|\*|_|{|}|[|]|\(|\)|#|\+|-|\.|!)/ @markdown_characters_regex ~r/(`|\*|_|{|}|[|]|\(|\)|#|\+|-|\.|!)/


+ 1
- 4
lib/pleroma/gopher/server.ex View File

@@ -37,10 +37,7 @@ end


defmodule Pleroma.Gopher.Server.ProtocolHandler do defmodule Pleroma.Gopher.Server.ProtocolHandler do
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.User
alias Pleroma.Activity
alias Pleroma.Repo
alias Pleroma.HTML
alias Pleroma.{Activity, HTML, User, Repo}


def start_link(ref, socket, transport, opts) do def start_link(ref, socket, transport, opts) do
pid = spawn_link(__MODULE__, :init, [ref, socket, transport, opts]) pid = spawn_link(__MODULE__, :init, [ref, socket, transport, opts])


+ 1
- 0
lib/pleroma/html.ex View File

@@ -125,6 +125,7 @@ defmodule Pleroma.HTML.Scrubber.Default do
@doc "The default HTML scrubbing policy: no " @doc "The default HTML scrubbing policy: no "


require HtmlSanitizeEx.Scrubber.Meta require HtmlSanitizeEx.Scrubber.Meta

alias HtmlSanitizeEx.Scrubber.Meta alias HtmlSanitizeEx.Scrubber.Meta


@markup Application.get_env(:pleroma, :markup) @markup Application.get_env(:pleroma, :markup)


+ 1
- 3
lib/pleroma/instances/instance.ex View File

@@ -1,15 +1,13 @@
defmodule Pleroma.Instances.Instance do defmodule Pleroma.Instances.Instance do
@moduledoc "Instance." @moduledoc "Instance."


alias Pleroma.Instances
alias Pleroma.{Instances, Repo}
alias Pleroma.Instances.Instance alias Pleroma.Instances.Instance


use Ecto.Schema use Ecto.Schema


import Ecto.{Query, Changeset} import Ecto.{Query, Changeset}


alias Pleroma.Repo

schema "instances" do schema "instances" do
field(:host, :string) field(:host, :string)
field(:unreachable_since, :naive_datetime) field(:unreachable_since, :naive_datetime)


+ 2
- 2
lib/pleroma/plugs/user_fetcher_plug.ex View File

@@ -3,9 +3,9 @@
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only


defmodule Pleroma.Plugs.UserFetcherPlug do defmodule Pleroma.Plugs.UserFetcherPlug do
alias Pleroma.{User, Repo}

import Plug.Conn import Plug.Conn
alias Pleroma.Repo
alias Pleroma.User


def init(options) do def init(options) do
options options


+ 1
- 2
lib/pleroma/user_invite_token.ex View File

@@ -7,8 +7,7 @@ defmodule Pleroma.UserInviteToken do


import Ecto.Changeset import Ecto.Changeset


alias Pleroma.UserInviteToken
alias Pleroma.Repo
alias Pleroma.{UserInviteToken, Repo}


schema "user_invite_tokens" do schema "user_invite_tokens" do
field(:token, :string) field(:token, :string)


+ 3
- 3
lib/pleroma/web/activity_pub/activity_pub.ex View File

@@ -5,11 +5,11 @@
defmodule Pleroma.Web.ActivityPub.ActivityPub do defmodule Pleroma.Web.ActivityPub.ActivityPub do
alias Pleroma.{Activity, Repo, Object, Upload, User, Notification, Instances} alias Pleroma.{Activity, Repo, Object, Upload, User, Notification, Instances}
alias Pleroma.Web.ActivityPub.{Transmogrifier, MRF} alias Pleroma.Web.ActivityPub.{Transmogrifier, MRF}
alias Pleroma.Web.WebFinger
alias Pleroma.Web.Federator
alias Pleroma.Web.OStatus
alias Pleroma.Web.{WebFinger, Federator, OStatus}

import Ecto.Query import Ecto.Query
import Pleroma.Web.ActivityPub.Utils import Pleroma.Web.ActivityPub.Utils

require Logger require Logger


@httpoison Application.get_env(:pleroma, :httpoison) @httpoison Application.get_env(:pleroma, :httpoison)


+ 1
- 4
lib/pleroma/web/activity_pub/activity_pub_controller.ex View File

@@ -7,10 +7,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do


alias Pleroma.{Activity, User, Object} alias Pleroma.{Activity, User, Object}
alias Pleroma.Web.ActivityPub.{ObjectView, UserView} alias Pleroma.Web.ActivityPub.{ObjectView, UserView}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Relay
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.{ActivityPub, Relay, Transmogrifier, Utils}
alias Pleroma.Web.Federator alias Pleroma.Web.Federator


require Logger require Logger


+ 2
- 6
lib/pleroma/web/activity_pub/transmogrifier.ex View File

@@ -6,12 +6,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
@moduledoc """ @moduledoc """
A module to handle coding from internal to wire ActivityPub and back. A module to handle coding from internal to wire ActivityPub and back.
""" """
alias Pleroma.User
alias Pleroma.Object
alias Pleroma.Activity
alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.{Activity, User, Object, Repo}
alias Pleroma.Web.ActivityPub.{ActivityPub, Utils}


import Ecto.Query import Ecto.Query




+ 5
- 7
lib/pleroma/web/activity_pub/views/user_view.ex View File

@@ -4,13 +4,11 @@


defmodule Pleroma.Web.ActivityPub.UserView do defmodule Pleroma.Web.ActivityPub.UserView do
use Pleroma.Web, :view use Pleroma.Web, :view
alias Pleroma.Web.Salmon
alias Pleroma.Web.WebFinger
alias Pleroma.User
alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils

alias Pleroma.Web.{WebFinger, Salmon}
alias Pleroma.{User, Repo}
alias Pleroma.Web.ActivityPub.{ActivityPub, Transmogrifier, Utils}

import Ecto.Query import Ecto.Query


# the instance itself is not a Person, but instead an Application # the instance itself is not a Person, but instead an Application


+ 1
- 2
lib/pleroma/web/common_api/common_api.ex View File

@@ -4,8 +4,7 @@


defmodule Pleroma.Web.CommonAPI do defmodule Pleroma.Web.CommonAPI do
alias Pleroma.{User, Repo, Activity, Object} alias Pleroma.{User, Repo, Activity, Object}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.{ActivityPub, Utils}
alias Pleroma.Formatter alias Pleroma.Formatter


import Pleroma.Web.CommonAPI.Utils import Pleroma.Web.CommonAPI.Utils


+ 1
- 2
lib/pleroma/web/common_api/utils.ex View File

@@ -7,9 +7,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do
alias Comeonin.Pbkdf2 alias Comeonin.Pbkdf2
alias Pleroma.{Activity, Formatter, Object, Repo} alias Pleroma.{Activity, Formatter, Object, Repo}
alias Pleroma.{User, Web} alias Pleroma.{User, Web}
alias Pleroma.Web.{Endpoint, MediaProxy}
alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.Endpoint
alias Pleroma.Web.MediaProxy


# This is a hack for twidere. # This is a hack for twidere.
def get_by_id_or_ap_id(id) do def get_by_id_or_ap_id(id) do


+ 4
- 6
lib/pleroma/web/federator/federator.ex View File

@@ -4,15 +4,13 @@


defmodule Pleroma.Web.Federator do defmodule Pleroma.Web.Federator do
use GenServer use GenServer
alias Pleroma.User
alias Pleroma.Activity
alias Pleroma.{Activity, User}
alias Pleroma.Web.{WebFinger, Websub, Salmon} alias Pleroma.Web.{WebFinger, Websub, Salmon}
alias Pleroma.Web.ActivityPub.{ActivityPub, Relay, Transmogrifier, Utils}
alias Pleroma.Web.Federator.RetryQueue alias Pleroma.Web.Federator.RetryQueue
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Relay
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.OStatus alias Pleroma.Web.OStatus

require Logger require Logger


@websub Application.get_env(:pleroma, :websub) @websub Application.get_env(:pleroma, :websub)


+ 2
- 2
lib/pleroma/web/http_signatures/http_signatures.ex View File

@@ -5,8 +5,8 @@
# https://tools.ietf.org/html/draft-cavage-http-signatures-08 # https://tools.ietf.org/html/draft-cavage-http-signatures-08
defmodule Pleroma.Web.HTTPSignatures do defmodule Pleroma.Web.HTTPSignatures do
alias Pleroma.User alias Pleroma.User
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.{ActivityPub, Utils}
require Logger require Logger


def split_signature(sig) do def split_signature(sig) do


+ 2
- 3
lib/pleroma/web/metadata/opengraph.ex View File

@@ -3,10 +3,9 @@
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only


defmodule Pleroma.Web.Metadata.Providers.OpenGraph do defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
alias Pleroma.Web.Metadata.Providers.Provider
alias Pleroma.Web.Metadata
alias Pleroma.{HTML, Formatter, User} alias Pleroma.{HTML, Formatter, User}
alias Pleroma.Web.MediaProxy
alias Pleroma.Web.{Metadata, MediaProxy}
alias Pleroma.Web.Metadata.Providers.Provider


@behaviour Provider @behaviour Provider




+ 2
- 3
lib/pleroma/web/ostatus/feed_representer.ex View File

@@ -3,10 +3,9 @@
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only


defmodule Pleroma.Web.OStatus.FeedRepresenter do defmodule Pleroma.Web.OStatus.FeedRepresenter do
alias Pleroma.Web.OStatus
alias Pleroma.Web.OStatus.{UserRepresenter, ActivityRepresenter}
alias Pleroma.User alias Pleroma.User
alias Pleroma.Web.MediaProxy
alias Pleroma.Web.{OStatus, MediaProxy}
alias Pleroma.Web.OStatus.{UserRepresenter, ActivityRepresenter}


def to_simple_form(user, activities, _users) do def to_simple_form(user, activities, _users) do
most_recent_update = most_recent_update =


+ 1
- 2
lib/pleroma/web/ostatus/handlers/note_handler.ex View File

@@ -6,8 +6,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
require Logger require Logger
alias Pleroma.Web.{XML, OStatus} alias Pleroma.Web.{XML, OStatus}
alias Pleroma.{Object, Activity} alias Pleroma.{Object, Activity}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.{ActivityPub, Utils}
alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI


@doc """ @doc """


+ 1
- 2
lib/pleroma/web/ostatus/ostatus.ex View File

@@ -10,10 +10,9 @@ defmodule Pleroma.Web.OStatus do
require Logger require Logger


alias Pleroma.{Repo, User, Web, Object, Activity} alias Pleroma.{Repo, User, Web, Object, Activity}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.{ActivityPub, Transmogrifier}
alias Pleroma.Web.{WebFinger, Websub} alias Pleroma.Web.{WebFinger, Websub}
alias Pleroma.Web.OStatus.{FollowHandler, UnfollowHandler, NoteHandler, DeleteHandler} alias Pleroma.Web.OStatus.{FollowHandler, UnfollowHandler, NoteHandler, DeleteHandler}
alias Pleroma.Web.ActivityPub.Transmogrifier


def is_representable?(%Activity{data: data}) do def is_representable?(%Activity{data: data}) do
object = Object.normalize(data["object"]) object = Object.normalize(data["object"])


+ 4
- 6
lib/pleroma/web/ostatus/ostatus_controller.ex View File

@@ -5,13 +5,11 @@
defmodule Pleroma.Web.OStatus.OStatusController do defmodule Pleroma.Web.OStatus.OStatusController do
use Pleroma.Web, :controller use Pleroma.Web, :controller


alias Pleroma.{User, Activity, Object}
alias Pleroma.Web.OStatus.{FeedRepresenter, ActivityRepresenter}
alias Pleroma.Web.{OStatus, Federator}
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.Web.XML alias Pleroma.Web.XML
alias Pleroma.Web.ActivityPub.ObjectView
alias Pleroma.Web.ActivityPub.ActivityPubController
alias Pleroma.Web.ActivityPub.ActivityPub


plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming]) plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming])




+ 3
- 2
lib/pleroma/web/salmon/salmon.ex View File

@@ -6,10 +6,11 @@ defmodule Pleroma.Web.Salmon do
@httpoison Application.get_env(:pleroma, :httpoison) @httpoison Application.get_env(:pleroma, :httpoison)


use Bitwise use Bitwise
alias Pleroma.Instances

alias Pleroma.{Instances, User}
alias Pleroma.Web.XML alias Pleroma.Web.XML
alias Pleroma.Web.OStatus.ActivityRepresenter alias Pleroma.Web.OStatus.ActivityRepresenter
alias Pleroma.User
require Logger require Logger


def decode(salmon) do def decode(salmon) do


+ 5
- 5
lib/pleroma/web/twitter_api/controllers/util_controller.ex View File

@@ -4,14 +4,14 @@


defmodule Pleroma.Web.TwitterAPI.UtilController do defmodule Pleroma.Web.TwitterAPI.UtilController do
use Pleroma.Web, :controller use Pleroma.Web, :controller

require Logger require Logger
alias Pleroma.Web
alias Pleroma.Web.OStatus
alias Pleroma.Web.WebFinger
alias Pleroma.Web.CommonAPI

alias Comeonin.Pbkdf2 alias Comeonin.Pbkdf2
alias Pleroma.{Emoji, PasswordResetToken, User, Repo}
alias Pleroma.Web
alias Pleroma.Web.{CommonAPI, OStatus, WebFinger}
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.{Repo, PasswordResetToken, User, Emoji}


def show_password_reset(conn, %{"token" => token}) do def show_password_reset(conn, %{"token" => token}) do
with %{used: false} = token <- Repo.get_by(PasswordResetToken, %{token: token}), with %{used: false} = token <- Repo.get_by(PasswordResetToken, %{token: token}),


+ 2
- 4
lib/pleroma/web/twitter_api/representers/activity_representer.ex View File

@@ -7,11 +7,9 @@
defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
use Pleroma.Web.TwitterAPI.Representers.BaseRepresenter use Pleroma.Web.TwitterAPI.Representers.BaseRepresenter
alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
alias Pleroma.{Activity, User}
alias Pleroma.Web.TwitterAPI.{TwitterAPI, UserView, ActivityView}
alias Pleroma.{Activity, Formatter, HTML, User}
alias Pleroma.Web.TwitterAPI.{ActivityView, TwitterAPI, UserView}
alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Formatter
alias Pleroma.HTML
alias Pleroma.Web.MastodonAPI.StatusView alias Pleroma.Web.MastodonAPI.StatusView


defp user_by_ap_id(user_list, ap_id) do defp user_by_ap_id(user_list, ap_id) do


+ 4
- 5
lib/pleroma/web/twitter_api/twitter_api_controller.ex View File

@@ -7,12 +7,11 @@ defmodule Pleroma.Web.TwitterAPI.Controller do


import Pleroma.Web.ControllerHelper, only: [json_response: 3] import Pleroma.Web.ControllerHelper, only: [json_response: 3]


alias Pleroma.Web.TwitterAPI.{TwitterAPI, UserView, ActivityView, NotificationView}
alias Pleroma.Web.CommonAPI
alias Pleroma.{Repo, Activity, Object, User, Notification}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Ecto.Changeset alias Ecto.Changeset
alias Pleroma.Web.ActivityPub.{ActivityPub, Utils}
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.TwitterAPI.{ActivityView, NotificationView, TwitterAPI, UserView}
alias Pleroma.{Activity, Object, Notification, Repo, User}


require Logger require Logger




+ 3
- 11
lib/pleroma/web/twitter_api/views/activity_view.ex View File

@@ -4,19 +4,11 @@


defmodule Pleroma.Web.TwitterAPI.ActivityView do defmodule Pleroma.Web.TwitterAPI.ActivityView do
use Pleroma.Web, :view use Pleroma.Web, :view
alias Pleroma.{Activity, Formatter, HTML, Object, Repo, User}
alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.User
alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.TwitterAPI.ActivityView
alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter
alias Pleroma.Web.MastodonAPI.StatusView alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.Activity
alias Pleroma.HTML
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Repo
alias Pleroma.Formatter
alias Pleroma.Web.TwitterAPI.{ActivityView, TwitterAPI, UserView}
alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter


import Ecto.Query import Ecto.Query
require Logger require Logger


+ 1
- 2
lib/pleroma/web/twitter_api/views/notification_view.ex View File

@@ -6,8 +6,7 @@ defmodule Pleroma.Web.TwitterAPI.NotificationView do
use Pleroma.Web, :view use Pleroma.Web, :view
alias Pleroma.{Notification, User} alias Pleroma.{Notification, User}
alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.TwitterAPI.ActivityView
alias Pleroma.Web.TwitterAPI.{ActivityView, UserView}


defp get_user(ap_id, opts) do defp get_user(ap_id, opts) do
cond do cond do


+ 1
- 3
lib/pleroma/web/twitter_api/views/user_view.ex View File

@@ -4,11 +4,9 @@


defmodule Pleroma.Web.TwitterAPI.UserView do defmodule Pleroma.Web.TwitterAPI.UserView do
use Pleroma.Web, :view use Pleroma.Web, :view
alias Pleroma.User
alias Pleroma.Formatter
alias Pleroma.{Formatter, HTML, User}
alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MediaProxy alias Pleroma.Web.MediaProxy
alias Pleroma.HTML


def render("show.json", %{user: user = %User{}} = assigns) do def render("show.json", %{user: user = %User{}} = assigns) do
render_one(user, Pleroma.Web.TwitterAPI.UserView, "user.json", assigns) render_one(user, Pleroma.Web.TwitterAPI.UserView, "user.json", assigns)


+ 1
- 2
lib/pleroma/web/websub/websub.ex View File

@@ -4,8 +4,7 @@


defmodule Pleroma.Web.Websub do defmodule Pleroma.Web.Websub do
alias Ecto.Changeset alias Ecto.Changeset
alias Pleroma.Repo
alias Pleroma.Instances
alias Pleroma.{Instances, Repo}
alias Pleroma.Web.Websub.{WebsubServerSubscription, WebsubClientSubscription} alias Pleroma.Web.Websub.{WebsubServerSubscription, WebsubClientSubscription}
alias Pleroma.Web.OStatus.FeedRepresenter alias Pleroma.Web.OStatus.FeedRepresenter
alias Pleroma.Web.{XML, Endpoint, OStatus} alias Pleroma.Web.{XML, Endpoint, OStatus}


Loading…
Cancel
Save