mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-22 17:27:18 +00:00
Remove unused functions and fix credo issues
This commit is contained in:
parent
ce23529d91
commit
fb96facc32
|
@ -7,9 +7,9 @@ defmodule Pleroma.Delivery do
|
|||
|
||||
alias Pleroma.Delivery
|
||||
alias Pleroma.FlakeId
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.User
|
||||
alias Pleroma.User
|
||||
|
||||
import Ecto.Changeset
|
||||
|
@ -39,13 +39,6 @@ defmodule Pleroma.Delivery do
|
|||
|> Repo.one()
|
||||
end
|
||||
|
||||
def get_or_create(object_id, user_id) do
|
||||
case get(object_id, user_id) do
|
||||
%Delivery{} = delivery -> {:ok, delivery}
|
||||
nil -> create(object_id, user_id)
|
||||
end
|
||||
end
|
||||
|
||||
# A hack because user delete activities have a fake id for whatever reason
|
||||
# TODO: Get rid of this
|
||||
def delete_all_by_object_id("pleroma:fake_object_id"), do: {0, []}
|
||||
|
@ -54,9 +47,4 @@ defmodule Pleroma.Delivery do
|
|||
from(d in Delivery, where: d.object_id == ^object_id)
|
||||
|> Repo.delete_all()
|
||||
end
|
||||
|
||||
def get_all_by_object_id(object_id) do
|
||||
from(d in Delivery, where: d.object_id == ^object_id)
|
||||
|> Repo.all()
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,8 +8,8 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
|||
alias Pleroma.Delivery
|
||||
alias Pleroma.HTTP
|
||||
alias Pleroma.Instances
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.ActivityPub.Relay
|
||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
|
|||
import Mock
|
||||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Instances
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Web.ActivityPub.Publisher
|
||||
alias Pleroma.Web.CommonAPI
|
||||
|
||||
|
|
Loading…
Reference in a new issue