logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: ff9290836b97f7358b056709e0891e01d641dd6d
parent: 23067908de957bb1e7ad2c87e64ae91e4328cb87
Author: lambda <lain@soykaf.club>
Date:   Mon,  8 Apr 2019 11:03:10 +0000

Merge branch 'feature/697-language-tag-metadata' into 'develop'

adding language tag

See merge request pleroma/pleroma!1034

Diffstat:

Mlib/pleroma/web/activity_pub/utils.ex5++++-
Mtest/web/activity_pub/utils_test.exs12++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex @@ -99,7 +99,10 @@ defmodule Pleroma.Web.ActivityPub.Utils do %{ "@context" => [ "https://www.w3.org/ns/activitystreams", - "#{Web.base_url()}/schemas/litepub-0.1.jsonld" + "#{Web.base_url()}/schemas/litepub-0.1.jsonld", + %{ + "@language" => "und" + } ] } end diff --git a/test/web/activity_pub/utils_test.exs b/test/web/activity_pub/utils_test.exs @@ -193,4 +193,16 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do assert Utils.fetch_ordered_collection("http://example.com/outbox", 5) == [0, 1] end end + + test "make_json_ld_header/0" do + assert Utils.make_json_ld_header() == %{ + "@context" => [ + "https://www.w3.org/ns/activitystreams", + "http://localhost:4001/schemas/litepub-0.1.jsonld", + %{ + "@language" => "und" + } + ] + } + end end