]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub.php
Add implementation of HTTP Media Type
[friendica.git] / src / Protocol / ActivityPub.php
index b9ab3931bd3de72ac965de2bf2d1dfd039b7607f..d1177e0b07375962c58665976e2fb6a0a43b2860 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -72,6 +72,8 @@ class ActivityPub
                'schema' => 'http://schema.org#',
                'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
                'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag',
+               'quoteUrl' => 'as:quoteUrl',
+               'conversation' => 'ostatus:conversation',
                'directMessage' => 'litepub:directMessage',
                'discoverable' => 'toot:discoverable',
                'PropertyValue' => 'schema:PropertyValue',
@@ -83,7 +85,7 @@ class ActivityPub
         *
         * @return bool is it AP?
         */
-       public static function isRequest()
+       public static function isRequest(): bool
        {
                $isrequest = stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
                        stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
@@ -202,6 +204,7 @@ class ActivityPub
         *
         * @param string  $url
         * @param integer $uid User ID
+        * @return void
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function fetchOutbox(string $url, int $uid)
@@ -268,7 +271,7 @@ class ActivityPub
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function isSupportedByContactUrl(string $url, $update = null)
+       public static function isSupportedByContactUrl(string $url, $update = null): bool
        {
                return !empty(APContact::getByURL($url, $update));
        }