X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Factivitycontext.php;h=e383b05734431c51dd1a6c554ccbfe6679ce941a;hb=97ce71e55d719af3ff53d70367c5e72312bcd136;hp=2eff3fb15fb1605513681efd16f32d25ed75786c;hpb=b7d07466943a73e1c009467c8daa6e499810080f;p=quix0rs-gnu-social.git diff --git a/lib/activitycontext.php b/lib/activitycontext.php index 2eff3fb15f..e383b05734 100644 --- a/lib/activitycontext.php +++ b/lib/activitycontext.php @@ -38,9 +38,11 @@ class ActivityContext public $replyToUrl; public $location; public $attention = array(); + public $attentionType = array(); public $conversation; public $forwardID; // deprecated, use ActivityVerb::SHARE instead public $forwardUrl; // deprecated, use ActivityVerb::SHARE instead + public $scope; const THR = 'http://purl.org/syndication/thread/1.0'; const GEORSS = 'http://www.georss.org/georss'; @@ -167,10 +169,14 @@ class ActivityContext $tos = array(); foreach ($this->attention as $attnUrl) { + if (array_key_exists($attnUrl, $this->attentionType)) { + $type = ActivityObject::canonicalType($this->attentionType[$attnUrl]); + } else { + $type = ActivityObject::canonicalType(ActivityObject::PERSON); + } $to = array( - 'objectType' => 'person', - 'id' => $attnUrl, - 'url' => $attnUrl + 'objectType' => $type, + 'id' => $attnUrl ); $tos[] = $to; }