MastodonAPI.Controller.StatusController: fix dialyzer error
lib/pleroma/web/mastodon_api/controllers/status_controller.ex:333:pattern_match The pattern can never match the type. Pattern: {:ok, _activity} Type: {:error, _}
This commit is contained in:
parent
138b3cb608
commit
3a8594e927
@ -505,7 +505,7 @@ defmodule Pleroma.Web.CommonAPI do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec unpin(String.t(), User.t()) :: {:ok, User.t()} | {:error, term()}
|
@spec unpin(String.t(), User.t()) :: {:ok, Activity.t()} | {:error, term()}
|
||||||
def unpin(id, user) do
|
def unpin(id, user) do
|
||||||
with %Activity{} = activity <- create_activity_by_id(id),
|
with %Activity{} = activity <- create_activity_by_id(id),
|
||||||
{:ok, unpin_data, _} <- Builder.unpin(user, activity.object),
|
{:ok, unpin_data, _} <- Builder.unpin(user, activity.object),
|
||||||
|
Loading…
Reference in New Issue
Block a user