[
:self,
:blocked,
- :local,
:muted,
:followers,
:follows,
User.blocks?(user, %{ap_id: actor})
end
- def skip?(:local, %{local: true}, %{info: %{notification_settings: %{"local" => false}}}),
- do: true
-
- def skip?(:local, %{local: false}, %{info: %{notification_settings: %{"remote" => false}}}),
- do: true
-
def skip?(:muted, activity, user) do
actor = activity.data["actor"]
field(:notification_settings, :map,
default: %{
- "remote" => true,
- "local" => true,
"followers" => true,
"follows" => true,
"non_follows" => true,
notification_settings =
info.notification_settings
|> Map.merge(settings)
- |> Map.take(["remote", "local", "followers", "follows", "non_follows", "non_followers"])
+ |> Map.take(["followers", "follows", "non_follows", "non_followers"])
params = %{notification_settings: notification_settings}