summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-11-11 09:41:58 -0600
committerMark Felder <feld@feld.me>2021-05-11 16:50:10 -0500
commit6e3379c70ff68af2cee2fd85e17c85209bbd637d (patch)
tree4a480b215c09d63551f40ca42a79893688b1bb3f
parenta121997ec764f09f64b960ff4b0a98a7d8b680c1 (diff)
Prefer plural assignment name when it's expecting a list
-rw-r--r--lib/pleroma/web/activity_pub/mrf/auto_subject_policy.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf/auto_subject_policy.ex b/lib/pleroma/web/activity_pub/mrf/auto_subject_policy.ex
index 5bdca08a0..2ae503fa6 100644
--- a/lib/pleroma/web/activity_pub/mrf/auto_subject_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/auto_subject_policy.ex
@@ -17,9 +17,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.AutoSubjectPolicy do
false
end
- defp string_matches?(content, keyword) when is_list(keyword) do
+ defp string_matches?(content, keywords) when is_list(keywords) do
wordlist = content |> String.downcase() |> String.split(" ", trim: true) |> Enum.uniq()
- Enum.any?(keyword, fn match -> String.downcase(match) in wordlist end)
+ Enum.any?(keywords, fn match -> String.downcase(match) in wordlist end)
end
defp string_matches?(content, keyword) when is_binary(keyword) do