From 93d0bff242b37deb5ae4e03041dff2a92cee7153 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 18 Dec 2019 14:29:33 +0100 Subject: [PATCH 1/2] Update docs to reflect new AP Event location property format Signed-off-by: Thomas Citharel --- docs/contribute/activity_pub.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/docs/contribute/activity_pub.md b/docs/contribute/activity_pub.md index 88f383e06..182927116 100644 --- a/docs/contribute/activity_pub.md +++ b/docs/contribute/activity_pub.md @@ -115,17 +115,15 @@ Example: #### location 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 { "@context": [ "...", { - "GeoCoordinates": "sc:GeoCoordinates", - "Place": "sc:Place", "PostalAddress": "sc:PostalAddress", "address": { "@id": "sc:address", @@ -134,14 +132,6 @@ A [Schema.org `Place` type](https://schema.org/Place) has [an `address` property "addressCountry": "sc:addressCountry", "addressLocality": "sc:addressLocality", "addressRegion": "sc:addressRegion", - "geo": { - "@id": "sc:geo", - "@type": "sc:GeoCoordinates" - }, - "location": { - "@id": "sc:location", - "@type": "sc:Place" - }, "postalCode": "sc:postalCode", "sc": "http://schema.org#", "streetAddress": "sc:streetAddress", @@ -157,11 +147,8 @@ A [Schema.org `Place` type](https://schema.org/Place) has [an `address` property "streetAddress": "10 Rue Jangot", "type": "PostalAddress" }, - "geo": { - "latitude": 4.8425657, - "longitude": 45.7517141, - "type": "GeoCoordinates" - }, + "latitude": 4.8425657, + "longitude": 45.7517141, "id": "http://mobilizon2.com/address/bdf7fb53-7177-46f3-8fb3-93c25a802522", "name": "10 Rue Jangot", "type": "Place" From d8c20feeadbbb82f6aa9d5dde0bb12e42b8d0638 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 18 Dec 2019 14:32:20 +0100 Subject: [PATCH 2/2] Use mix.exs version instead of config one Signed-off-by: Thomas Citharel --- config/config.exs | 1 - lib/mobilizon/config.ex | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index 7a2472555..b21165f62 100644 --- a/config/config.exs +++ b/config/config.exs @@ -15,7 +15,6 @@ config :mobilizon, :instance, description: System.get_env("MOBILIZON_INSTANCE_DESCRIPTION") || "Change this to a proper description of your instance", - version: "1.0.0-dev", hostname: System.get_env("MOBILIZON_INSTANCE_HOST") || "localhost", registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") || false, registration_email_whitelist: [], diff --git a/lib/mobilizon/config.ex b/lib/mobilizon/config.ex index 459c80267..80c616447 100644 --- a/lib/mobilizon/config.ex +++ b/lib/mobilizon/config.ex @@ -13,7 +13,7 @@ defmodule Mobilizon.Config do def instance_description, do: instance_config()[:description] @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() def instance_hostname, do: instance_config()[:hostname]