mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 16:03:25 +00:00
Fix online address validation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
d25e63cabb
commit
2634c7f46b
2 changed files with 3 additions and 1 deletions
|
@ -95,6 +95,8 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier do
|
|||
{:ok, activity, event}
|
||||
else
|
||||
{:existing_event, %Event{} = event} -> {:ok, nil, event}
|
||||
{:error, _, _} -> :error
|
||||
{:error, _} -> :error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
|
|||
defp date_to_string(%DateTime{} = date), do: DateTime.to_iso8601(date)
|
||||
|
||||
defp get_online_address(attachments) do
|
||||
Enum.find_value(attachments, [], fn attachment ->
|
||||
Enum.find_value(attachments, fn attachment ->
|
||||
case attachment do
|
||||
%{
|
||||
"type" => "Link",
|
||||
|
|
Loading…
Reference in a new issue