Credo fixes.

This commit is contained in:
lain 2020-04-20 12:29:19 +02:00
commit 970b74383b
8 changed files with 12 additions and 11 deletions

View file

@ -6,8 +6,8 @@ defmodule Pleroma.Chat do
use Ecto.Schema
import Ecto.Changeset
alias Pleroma.User
alias Pleroma.Repo
alias Pleroma.User
@moduledoc """
Chat keeps a reference to ChatMessage conversations between a user and an recipient. The recipient can be a user (for now) or a group (not implemented yet).

View file

@ -11,9 +11,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator
alias Pleroma.Web.ActivityPub.ObjectValidators.ChatMessageValidator
alias Pleroma.Web.ActivityPub.ObjectValidators.CreateChatMessageValidator
alias Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator
@spec validate(map(), keyword()) :: {:ok, map(), keyword()} | {:error, any()}
def validate(object, meta)

View file

@ -5,8 +5,8 @@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatMessageValidator do
use Ecto.Schema
alias Pleroma.Web.ActivityPub.ObjectValidators.Types
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ObjectValidators.Types
import Ecto.Changeset

View file

@ -7,6 +7,7 @@ defmodule Pleroma.Web.CommonAPI do
alias Pleroma.ActivityExpiration
alias Pleroma.Conversation.Participation
alias Pleroma.FollowingRelationship
alias Pleroma.Formatter
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.ThreadMute
@ -17,7 +18,6 @@ defmodule Pleroma.Web.CommonAPI do
alias Pleroma.Web.ActivityPub.Pipeline
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Formatter
import Pleroma.Web.Gettext
import Pleroma.Web.CommonAPI.Utils

View file

@ -7,8 +7,8 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do
alias Pleroma.Activity
alias Pleroma.Notification
alias Pleroma.User
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.UserRelationship
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.AccountView
@ -83,7 +83,8 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do
end
end
# This returns the notification type by activity, but both chats and statuses are in "Create" activities.
# This returns the notification type by activity, but both chats and statuses
# are in "Create" activities.
mastodon_type =
case Activity.mastodon_notification_type(activity) do
"mention" ->

View file

@ -6,13 +6,13 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
alias Pleroma.Chat
alias Pleroma.Object
alias Pleroma.Pagination
alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.PleromaAPI.ChatView
alias Pleroma.Web.PleromaAPI.ChatMessageView
alias Pleroma.Pagination
alias Pleroma.Web.PleromaAPI.ChatView
import Ecto.Query