end
end
+ def get_notified_from_activity(activity, local_only \\ true)
+
def get_notified_from_activity(
%Activity{data: %{"to" => _, "type" => type} = data} = activity,
- local_only \\ true
+ local_only
)
when type in ["Create", "Like", "Announce", "Follow"] do
recipients =
User.get_users_from_set(recipients, local_only)
end
+ def get_notified_from_activity(_, local_only), do: []
+
defp maybe_notify_to_recipients(
recipients,
%Activity{data: %{"to" => to, "type" => type}} = activity