]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Receiver.php
Merge pull request #10230 from annando/oauth-login
[friendica.git] / src / Protocol / ActivityPub / Receiver.php
index c98e7014396a5377760f345e53a4f4ce72afcee4..34d45d5ab8d59e923a12ede9d98843a3809e99a2 100644 (file)
@@ -111,9 +111,12 @@ class Receiver
                }
 
                $http_signer = HTTPSignature::getSigner($body, $header);
-               if (empty($http_signer)) {
+               if ($http_signer === false) {
                        Logger::warning('Invalid HTTP signature, message will be discarded.');
                        return;
+               } elseif (empty($http_signer)) {
+                       Logger::info('Signer is a tombstone. The message will be discarded, the signer account is deleted.');
+                       return;
                } else {
                        Logger::info('Valid HTTP signature', ['signer' => $http_signer]);
                }
@@ -1268,14 +1271,6 @@ class Receiver
                        } elseif ($filetype == 'video') {
                                $height = (int)JsonLD::fetchElement($url, 'as:height', '@value');
                                $size = (int)JsonLD::fetchElement($url, 'pt:size', '@value');
-
-                               // We save bandwidth by using a moderate height (alt least 480 pixel height)
-                               // Peertube normally uses these heights: 240, 360, 480, 720, 1080
-                               if (!empty($attachments[$filetype]['height']) &&
-                                       ($height > $attachments[$filetype]['height']) && ($attachments[$filetype]['height'] >= 480)) {
-                                       continue;
-                               }
-
                                $attachments[$filetype] = ['type' => $mediatype, 'url' => $href, 'height' => $height, 'size' => $size];
                        } elseif (in_array($mediatype, ['application/x-bittorrent', 'application/x-bittorrent;x-scheme-handler/magnet'])) {
                                $height = (int)JsonLD::fetchElement($url, 'as:height', '@value');