commit: 0b864c3696e47ba1def6047905dad9065b0bee0e
parent bef15cde6141a977aebdfc998d6091a31c4fc2d6
Author: Mark Felder <feld@feld.me>
Date: Tue, 28 May 2024 08:49:34 -0400
Dialyzer: fix invalid @spec
lib/pleroma/notification.ex:492:invalid_contract
The @spec for the function does not match the success typing of the function.
Function:
Pleroma.Notification.get_notified_from_activity/2
Success typing:
@spec get_notified_from_activity(_, _) :: [any()]
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
@@ -489,7 +489,7 @@ defmodule Pleroma.Notification do
NOTE: might be called for FAKE Activities, see ActivityPub.Utils.get_notified_from_object/1
"""
- @spec get_notified_from_activity(Activity.t(), boolean()) :: {list(User.t()), list(User.t())}
+ @spec get_notified_from_activity(Activity.t(), boolean()) :: list(User.t())
def get_notified_from_activity(activity, local_only \\ true)
def get_notified_from_activity(%Activity{data: %{"type" => type}} = activity, local_only)