Merge branch 'bug/activity-pub-place' into 'master'
Bug/activity pub place See merge request framasoft/mobilizon!367
This commit is contained in:
commit
31426f28d9
@ -15,7 +15,6 @@ config :mobilizon, :instance,
|
|||||||
description:
|
description:
|
||||||
System.get_env("MOBILIZON_INSTANCE_DESCRIPTION") ||
|
System.get_env("MOBILIZON_INSTANCE_DESCRIPTION") ||
|
||||||
"Change this to a proper description of your instance",
|
"Change this to a proper description of your instance",
|
||||||
version: "1.0.0-dev",
|
|
||||||
hostname: System.get_env("MOBILIZON_INSTANCE_HOST") || "localhost",
|
hostname: System.get_env("MOBILIZON_INSTANCE_HOST") || "localhost",
|
||||||
registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") || false,
|
registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") || false,
|
||||||
registration_email_whitelist: [],
|
registration_email_whitelist: [],
|
||||||
|
@ -115,17 +115,15 @@ Example:
|
|||||||
#### location
|
#### location
|
||||||
|
|
||||||
We use Schema.org's `location` property on `Event`.
|
We use Schema.org's `location` property on `Event`.
|
||||||
[The ActivityStream vocabulary to represent places](https://www.w3.org/TR/activitystreams-vocabulary/#places) is quite limited so instead of using `Place` from ActivityStreams we use `Place` from Schema.org.
|
[The ActivityStream vocabulary to represent places](https://www.w3.org/TR/activitystreams-vocabulary/#places) is quite limited so instead of just using `Place` from ActivityStreams we also a a few properties from Schema.org's `Place` vocabulary.
|
||||||
|
|
||||||
A [Schema.org `Place` type](https://schema.org/Place) has [an `address` property](https://schema.org/address), which we assume to be [of `PostalAddress` type](https://schema.org/PostalAddress) and [a `geo` property](https://schema.org/geo), which is assumed to be of [`GeoCoordinates` type](https://schema.org/GeoCoordinates).
|
We add [an `address` property](https://schema.org/address), which we assume to be [of `PostalAddress` type](https://schema.org/PostalAddress).
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"@context": [
|
"@context": [
|
||||||
"...",
|
"...",
|
||||||
{
|
{
|
||||||
"GeoCoordinates": "sc:GeoCoordinates",
|
|
||||||
"Place": "sc:Place",
|
|
||||||
"PostalAddress": "sc:PostalAddress",
|
"PostalAddress": "sc:PostalAddress",
|
||||||
"address": {
|
"address": {
|
||||||
"@id": "sc:address",
|
"@id": "sc:address",
|
||||||
@ -134,14 +132,6 @@ A [Schema.org `Place` type](https://schema.org/Place) has [an `address` property
|
|||||||
"addressCountry": "sc:addressCountry",
|
"addressCountry": "sc:addressCountry",
|
||||||
"addressLocality": "sc:addressLocality",
|
"addressLocality": "sc:addressLocality",
|
||||||
"addressRegion": "sc:addressRegion",
|
"addressRegion": "sc:addressRegion",
|
||||||
"geo": {
|
|
||||||
"@id": "sc:geo",
|
|
||||||
"@type": "sc:GeoCoordinates"
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"@id": "sc:location",
|
|
||||||
"@type": "sc:Place"
|
|
||||||
},
|
|
||||||
"postalCode": "sc:postalCode",
|
"postalCode": "sc:postalCode",
|
||||||
"sc": "http://schema.org#",
|
"sc": "http://schema.org#",
|
||||||
"streetAddress": "sc:streetAddress",
|
"streetAddress": "sc:streetAddress",
|
||||||
@ -157,11 +147,8 @@ A [Schema.org `Place` type](https://schema.org/Place) has [an `address` property
|
|||||||
"streetAddress": "10 Rue Jangot",
|
"streetAddress": "10 Rue Jangot",
|
||||||
"type": "PostalAddress"
|
"type": "PostalAddress"
|
||||||
},
|
},
|
||||||
"geo": {
|
"latitude": 4.8425657,
|
||||||
"latitude": 4.8425657,
|
"longitude": 45.7517141,
|
||||||
"longitude": 45.7517141,
|
|
||||||
"type": "GeoCoordinates"
|
|
||||||
},
|
|
||||||
"id": "http://mobilizon2.com/address/bdf7fb53-7177-46f3-8fb3-93c25a802522",
|
"id": "http://mobilizon2.com/address/bdf7fb53-7177-46f3-8fb3-93c25a802522",
|
||||||
"name": "10 Rue Jangot",
|
"name": "10 Rue Jangot",
|
||||||
"type": "Place"
|
"type": "Place"
|
||||||
|
@ -13,7 +13,7 @@ defmodule Mobilizon.Config do
|
|||||||
def instance_description, do: instance_config()[:description]
|
def instance_description, do: instance_config()[:description]
|
||||||
|
|
||||||
@spec instance_version :: String.t()
|
@spec instance_version :: String.t()
|
||||||
def instance_version, do: instance_config()[:version]
|
def instance_version, do: Mix.Project.config()[:version]
|
||||||
|
|
||||||
@spec instance_hostname :: String.t()
|
@spec instance_hostname :: String.t()
|
||||||
def instance_hostname, do: instance_config()[:hostname]
|
def instance_hostname, do: instance_config()[:hostname]
|
||||||
|
Loading…
Reference in New Issue
Block a user