]> cat aescling's git repositories - mastodon.git/commitdiff
Fix incorrect context definition for the "featured" keyword (#8090)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 30 Jul 2018 17:33:37 +0000 (19:33 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Jul 2018 17:33:37 +0000 (19:33 +0200)
* Fix incorrect context definition for the "featured" keyword

Fix #8077

* Adjust context definition for movedTo

app/lib/activitypub/adapter.rb

index e880499f1a621284784c0434dd81536ce43b74c9..d35cae889d1809f0666dad9fac0b9b64b79e7e3d 100644 (file)
@@ -9,7 +9,7 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
       {
         'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
         'sensitive'                 => 'as:sensitive',
-        'movedTo'                   => 'as:movedTo',
+        'movedTo'                   => { '@id' => 'as:movedTo', '@type' => '@id' },
         'Hashtag'                   => 'as:Hashtag',
         'ostatus'                   => 'http://ostatus.org#',
         'atomUri'                   => 'ostatus:atomUri',
@@ -18,7 +18,7 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
         'toot'                      => 'http://joinmastodon.org/ns#',
         'Emoji'                     => 'toot:Emoji',
         'focalPoint'                => { '@container' => '@list', '@id' => 'toot:focalPoint' },
-        'featured'                  => 'toot:featured',
+        'featured'                  => { '@id' => 'toot:featured', '@type' => '@id' },
         'schema'                    => 'http://schema.org#',
         'PropertyValue'             => 'schema:PropertyValue',
         'value'                     => 'schema:value',