Pleroma.Web.ActivityPub.SideEffects: dialyzer errors
lib/pleroma/web/activity_pub/side_effects.ex:328:pattern_match The pattern can never match the type. Pattern: {:actor, _} Type: {:error, boolean()} lib/pleroma/web/activity_pub/side_effects.ex:328:pattern_match The pattern can never match the type. Pattern: {:actor, _} Type: nil
This commit is contained in:
parent
94d7e28cbe
commit
5f5bd64b83
@ -304,9 +304,9 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||||||
result =
|
result =
|
||||||
case deleted_object do
|
case deleted_object do
|
||||||
%Object{} ->
|
%Object{} ->
|
||||||
with {:ok, deleted_object, _activity} <- Object.delete(deleted_object),
|
with {_, {:ok, deleted_object, _activity}} <- {:object, Object.delete(deleted_object)},
|
||||||
{_, actor} when is_binary(actor) <- {:actor, deleted_object.data["actor"]},
|
{_, actor} when is_binary(actor) <- {:actor, deleted_object.data["actor"]},
|
||||||
%User{} = user <- User.get_cached_by_ap_id(actor) do
|
{_, %User{} = user} <- {:user, User.get_cached_by_ap_id(actor)} do
|
||||||
User.remove_pinned_object_id(user, deleted_object.data["id"])
|
User.remove_pinned_object_id(user, deleted_object.data["id"])
|
||||||
|
|
||||||
{:ok, user} = ActivityPub.decrease_note_count_if_public(user, deleted_object)
|
{:ok, user} = ActivityPub.decrease_note_count_if_public(user, deleted_object)
|
||||||
@ -328,6 +328,17 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||||||
{:actor, _} ->
|
{:actor, _} ->
|
||||||
@logger.error("The object doesn't have an actor: #{inspect(deleted_object)}")
|
@logger.error("The object doesn't have an actor: #{inspect(deleted_object)}")
|
||||||
:no_object_actor
|
:no_object_actor
|
||||||
|
|
||||||
|
{:user, _} ->
|
||||||
|
@logger.error(
|
||||||
|
"The object's actor could not be resolved to a user: #{inspect(deleted_object)}"
|
||||||
|
)
|
||||||
|
|
||||||
|
:no_object_user
|
||||||
|
|
||||||
|
{:object, _} ->
|
||||||
|
@logger.error("The object could not be deleted: #{inspect(deleted_object)}")
|
||||||
|
{:error, object}
|
||||||
end
|
end
|
||||||
|
|
||||||
%User{} ->
|
%User{} ->
|
||||||
|
Loading…
Reference in New Issue
Block a user