Improve a guard
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
a18c4daf4c
commit
f6a17d8b3a
@ -228,13 +228,13 @@ defmodule Mobilizon.Federation.ActivityPub.Audience do
|
|||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp add_event_contacts(%Event{contacts: contacts}) do
|
defp add_event_contacts(%Event{contacts: contacts}) when is_list(contacts) do
|
||||||
contacts
|
contacts
|
||||||
|> Enum.map(& &1.url)
|
|> Enum.map(& &1.url)
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp add_event_contacts(%Event{}), do: []
|
defp add_event_contacts(_), do: []
|
||||||
|
|
||||||
defp process_mention({_, mentioned_actor}), do: mentioned_actor.url
|
defp process_mention({_, mentioned_actor}), do: mentioned_actor.url
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user