From 4b765b18864d4bca4bc1098d4373c2e126e28d49 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 15 Jun 2024 15:06:28 +0100 Subject: [PATCH] mix format --- .../web/pleroma_api/controllers/emoji_reaction_controller.ex | 4 +--- test/pleroma/web/mastodon_api/views/status_view_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex b/lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex index 49910df65..66cff7aaa 100644 --- a/lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex @@ -54,11 +54,10 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionController do defp filter_allowed_users_by_domain(ap_ids, %User{} = for_user) do Enum.reject(ap_ids, fn ap_id -> - User.blocks_domain?(for_user, ap_id) + User.blocks_domain?(for_user, ap_id) end) end - defp filter_allowed_users_by_domain(ap_ids, nil), do: ap_ids def filter_allowed_users(reactions, user, with_muted) do @@ -80,7 +79,6 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionController do end end - reactions |> Stream.map(fn [emoji, users, url] when is_list(users) -> filter_emoji.(emoji, users, url) diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index 41351a0fb..6421df132 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -62,7 +62,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do account_ids: [other_user.id, user.id] }, %{name: "🍵", count: 1, me: false, url: nil, account_ids: [third_user.id]}, - %{name: "😈", count: 1, me: false, url: nil, account_ids: [domain_blocked_user.id]} + %{name: "😈", count: 1, me: false, url: nil, account_ids: [domain_blocked_user.id]} ] status = StatusView.render("show.json", activity: activity, for: user) @@ -81,7 +81,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do %{name: "🍵", count: 1, me: false, url: nil, account_ids: [third_user.id]} ] - refute Enum.any?(status[:pleroma][:emoji_reactions], fn reaction -> reaction[:name] == "😈" end) + refute Enum.any?(status[:pleroma][:emoji_reactions], fn reaction -> reaction[:name] == "😈" end) end test "works correctly with badly formatted emojis" do