| @@ -15,12 +15,43 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * @see https://www.w3.org/TR/activitystreams-vocabulary/#actor-types |
| 17 | 17 | */ |
| 18 | 18 | class Actor extends Base_Object { |
| 19 | + // Reduced context for actors. TODO: still unused. | |
| 20 | + const JSON_LD_CONTEXT = array( | |
| 21 | + 'https://www.w3.org/ns/activitystreams', | |
| 22 | + 'https://w3id.org/security/v1', | |
| 23 | + 'https://purl.archive.org/socialweb/webfinger', | |
| 24 | + array( | |
| 25 | + 'schema' => 'http://schema.org#', | |
| 26 | + 'toot' => 'http://joinmastodon.org/ns#', | |
| 27 | + 'lemmy' => 'https://join-lemmy.org/ns#', | |
| 28 | + 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers', | |
| 29 | + 'PropertyValue' => 'schema:PropertyValue', | |
| 30 | + 'value' => 'schema:value', | |
| 31 | + 'Hashtag' => 'as:Hashtag', | |
| 32 | + 'featured' => array( | |
| 33 | + '@id' => 'toot:featured', | |
| 34 | + '@type' => '@id', | |
| 35 | + ), | |
| 36 | + 'featuredTags' => array( | |
| 37 | + '@id' => 'toot:featuredTags', | |
| 38 | + '@type' => '@id', | |
| 39 | + ), | |
| 40 | + 'moderators' => array( | |
| 41 | + '@id' => 'lemmy:moderators', | |
| 42 | + '@type' => '@id', | |
| 43 | + ), | |
| 44 | + 'postingRestrictedToMods' => 'lemmy:postingRestrictedToMods', | |
| 45 | + 'discoverable' => 'toot:discoverable', | |
| 46 | + 'indexable' => 'toot:indexable', | |
| 47 | + ), | |
| 48 | + ); | |
| 49 | + | |
| 19 | 50 | /** |
| 20 | 51 | * @var string |
| 21 | 52 | */ |
| 22 | - protected $type = 'Person'; | |
| 53 | + protected $type; | |
| 23 | 54 | |
| 24 | 55 | /** |
| 25 | 56 | * A reference to an ActivityStreams OrderedCollection comprised of |
| 26 | 57 | * all the messages received by the actor. |
| @@ -131,8 +162,10 @@ | ||
| 131 | 162 | * |
| 132 | 163 | * WordPress does only support 'false' at the moment. |
| 133 | 164 | * |
| 134 | 165 | * @see https://docs.joinmastodon.org/spec/activitypub/#as |
| 166 | + * | |
| 167 | + * @context as:manuallyApprovesFollowers | |
| 135 | 168 | * |
| 136 | 169 | * @var boolean |
| 137 | 170 | */ |
| 138 | 171 | protected $manually_approves_followers = false; |