summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-01-22 18:35:07 -0500
committerMark Felder <feld@feld.me>2024-01-22 18:37:29 -0500
commit3a8594e92759aa10d3e6ad5b4a1892beb6d74cc9 (patch)
treeb2239df327a7479f5cd2914643298380a3e0bf20
parent138b3cb608f7b87ec1c51d524db4e98a4c6d4bcf (diff)
downloadpleroma-3a8594e92759aa10d3e6ad5b4a1892beb6d74cc9.tar.gz
pleroma-3a8594e92759aa10d3e6ad5b4a1892beb6d74cc9.zip
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, _}
-rw-r--r--lib/pleroma/web/common_api.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api.ex b/lib/pleroma/web/common_api.ex
index dfc0a625d..61d9e1c7c 100644
--- a/lib/pleroma/web/common_api.ex
+++ b/lib/pleroma/web/common_api.ex
@@ -505,7 +505,7 @@ defmodule Pleroma.Web.CommonAPI do
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
with %Activity{} = activity <- create_activity_by_id(id),
{:ok, unpin_data, _} <- Builder.unpin(user, activity.object),