+ |> User.get_users_from_set(local_only)
+
+ notification_enabled_users =
+ Enum.filter(potential_receivers, fn u -> u.ap_id in notification_enabled_ap_ids end)
+
+ {notification_enabled_users, potential_receivers -- notification_enabled_users}
+ end
+
+ def get_notified_from_activity(_, _local_only), do: {[], []}
+
+ @doc "Filters out AP IDs of users basing on their relationships with activity actor user"
+ def exclude_relationship_restricted_ap_ids([], _activity), do: []
+
+ def exclude_relationship_restricted_ap_ids(ap_ids, %Activity{} = activity) do
+ relationship_restricted_ap_ids =
+ activity
+ |> Activity.user_actor()
+ |> User.incoming_relationships_ungrouped_ap_ids([
+ :block,
+ :notification_mute
+ ])