From 86a8aa5e5c0fd718f83a8f820354315d0983b61e Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 5 May 2025 15:12:07 +0200 Subject: [PATCH] Add built-in context for interaction policies (#34574) --- app/helpers/context_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb index 18bb088b48..6662aaaa92 100644 --- a/app/helpers/context_helper.rb +++ b/app/helpers/context_helper.rb @@ -25,6 +25,13 @@ module ContextHelper voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' }, suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' }, attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@type' => '@id' } }, + interaction_policies: { + 'gts' => 'https://gotosocial.org/ns#', + 'interactionPolicy' => { '@id' => 'gts:interactionPolicy', '@type' => '@id' }, + 'canQuote' => { '@id' => 'gts:canQuote', '@type' => '@id' }, + 'automaticApproval' => { '@id' => 'gts:automaticApproval', '@type' => '@id' }, + 'manualApproval' => { '@id' => 'gts:manualApproval', '@type' => '@id' }, + }, }.freeze def full_context