Credo fixes.
This commit is contained in:
parent
5b6818b3e5
commit
970b74383b
8 changed files with 12 additions and 11 deletions
|
@ -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).
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 @@ def render(
|
|||
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" ->
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do
|
||||
use Pleroma.DataCase
|
||||
|
||||
alias Pleroma.Web.ActivityPub.Builder
|
||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||
alias Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator
|
||||
alias Pleroma.Web.ActivityPub.Utils
|
||||
alias Pleroma.Web.CommonAPI
|
||||
alias Pleroma.Web.ActivityPub.Builder
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
|
|||
use Pleroma.DataCase
|
||||
|
||||
alias Pleroma.Chat
|
||||
alias Pleroma.Web.PleromaAPI.ChatView
|
||||
alias Pleroma.Web.MastodonAPI.AccountView
|
||||
alias Pleroma.Web.PleromaAPI.ChatView
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
|
|
Loading…
Reference in a new issue