From c88632ce8beea89b3bf40e9c942e267129437c8f Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 6 Mar 2022 22:01:01 +0100 Subject: [PATCH] Changeset tag `host`: Add domain and path (#689) * Changeset tag `host`: Add domain and path Extend the value of the changeset tag host key to include the full url of the editor. This way a reader of the changeset can open the editor based on this value. * Remove `path` from changeset tags --- Logic/Osm/ChangesetHandler.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Logic/Osm/ChangesetHandler.ts b/Logic/Osm/ChangesetHandler.ts index 21fc42dd2..b62f9374b 100644 --- a/Logic/Osm/ChangesetHandler.ts +++ b/Logic/Osm/ChangesetHandler.ts @@ -347,13 +347,10 @@ export class ChangesetHandler { const self = this; return new Promise(function (resolve, reject) { - let path = window.location.pathname; - path = path.substr(1, path.lastIndexOf("/")); const metadata = [ ["created_by", `MapComplete ${Constants.vNumber}`], ["locale", Locale.language.data], - ["host", window.location.host], - ["path", path], + ["host", `${window.location.origin}${window.location.pathname}`], ["source", self.changes.state["currentUserLocation"]?.features?.data?.length > 0 ? "survey" : undefined], ["imagery", self.changes.state["backgroundLayer"]?.data?.id], ...changesetTags.map(cstag => [cstag.key, cstag.value]) @@ -408,4 +405,4 @@ export class ChangesetHandler { } -} \ No newline at end of file +}