Expose isOnline through AP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b012be0541
commit
87b37a4153
|
@ -112,6 +112,10 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
|
||||||
"@id" => "mz:participationMessage",
|
"@id" => "mz:participationMessage",
|
||||||
"@type" => "sc:Text"
|
"@type" => "sc:Text"
|
||||||
},
|
},
|
||||||
|
"isOnline" => %{
|
||||||
|
"@type" => "sc:Boolean",
|
||||||
|
"@id" => "mz:isOnline"
|
||||||
|
},
|
||||||
"PropertyValue" => "sc:PropertyValue",
|
"PropertyValue" => "sc:PropertyValue",
|
||||||
"value" => "sc:value",
|
"value" => "sc:value",
|
||||||
"propertyID" => "sc:propertyID",
|
"propertyID" => "sc:propertyID",
|
||||||
|
|
|
@ -139,7 +139,8 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
|
||||||
"url" => event.url,
|
"url" => event.url,
|
||||||
"inLanguage" => event.language,
|
"inLanguage" => event.language,
|
||||||
"timezone" => event.options.timezone,
|
"timezone" => event.options.timezone,
|
||||||
"contacts" => Enum.map(event.contacts, & &1.url)
|
"contacts" => Enum.map(event.contacts, & &1.url),
|
||||||
|
"isOnline" => event.options.is_online
|
||||||
}
|
}
|
||||||
|> maybe_add_physical_address(event)
|
|> maybe_add_physical_address(event)
|
||||||
|> maybe_add_event_picture(event)
|
|> maybe_add_event_picture(event)
|
||||||
|
@ -168,7 +169,8 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
|
||||||
"repliesModerationOption",
|
"repliesModerationOption",
|
||||||
if(Map.get(object, "commentsEnabled", true), do: :allow_all, else: :closed)
|
if(Map.get(object, "commentsEnabled", true), do: :allow_all, else: :closed)
|
||||||
),
|
),
|
||||||
timezone: calculate_timezone(object, address)
|
timezone: calculate_timezone(object, address),
|
||||||
|
is_online: object["isOnline"] == true
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue