aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-03-30 19:08:37 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-03-30 19:08:37 +0300
commit9c94b6a327118d8c7ea21355d6c378ef31c54321 (patch)
tree5a516d7320c4183dfdb8d4381cf78d3a7db0c908
parentbe9d18461a5ed6bd835e2eba8d3b54ba61fc51fb (diff)
downloadpleroma-9c94b6a327118d8c7ea21355d6c378ef31c54321.tar.gz
[#2332] Misc. fixes per code change requests.
-rw-r--r--lib/pleroma/web/activity_pub/mrf.ex2
-rw-r--r--priv/repo/migrations/20200328130139_add_following_relationships_following_id_index.exs2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex
index f54647945..a0b3af432 100644
--- a/lib/pleroma/web/activity_pub/mrf.ex
+++ b/lib/pleroma/web/activity_pub/mrf.ex
@@ -33,7 +33,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
@spec subdomain_match?([Regex.t()], String.t()) :: boolean()
def subdomain_match?(domains, host) do
- !!Enum.find(domains, fn domain -> Regex.match?(domain, host) end)
+ Enum.any?(domains, fn domain -> Regex.match?(domain, host) end)
end
@callback describe() :: {:ok | :error, Map.t()}
diff --git a/priv/repo/migrations/20200328130139_add_following_relationships_following_id_index.exs b/priv/repo/migrations/20200328130139_add_following_relationships_following_id_index.exs
index 4c9faf48f..884832f84 100644
--- a/priv/repo/migrations/20200328130139_add_following_relationships_following_id_index.exs
+++ b/priv/repo/migrations/20200328130139_add_following_relationships_following_id_index.exs
@@ -6,6 +6,6 @@ defmodule Pleroma.Repo.Migrations.AddFollowingRelationshipsFollowingIdIndex do
def change do
drop_if_exists(index(:following_relationships, [:follower_id]))
- create_if_not_exists(drop_if_exists(index(:following_relationships, [:following_id])))
+ create_if_not_exists(index(:following_relationships, [:following_id]))
end
end