]> git.mxchange.org Git - friendica.git/commitdiff
Support for Bluesky reshares in the core
authorMichael <heluecht@pirati.ca>
Wed, 24 May 2023 05:55:36 +0000 (05:55 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 24 May 2023 05:55:36 +0000 (05:55 +0000)
src/Model/Item.php
src/Object/Post.php

index 6da214398bf03fc01dd12eda710df38593496c1c..8f45b3eb51d9c341189b7cc9243a22419d69fe31 100644 (file)
@@ -2050,7 +2050,11 @@ class Item
                }
 
                // Glue it together to be able to make a hash from it
-               $host_id = implode('/', $parsed);
+               if (!empty($parsed)) {
+                       $host_id = implode('/', $parsed);
+               } else {
+                       $host_id = $uri;
+               }
 
                // Use a mixture of several hashes to provide some GUID like experience
                return hash('crc32', $hostPart) . '-' . hash('joaat', $host_id) . '-' . hash('fnv164', $host_id);
index 9dfd205ec83d588405ba4d688b7e74a62f7613d8..0f5e98aed92e7ffc4f6f740a011f209333e7a9c1 100644 (file)
@@ -206,7 +206,7 @@ class Post
                $connector = !in_array($item['network'], Protocol::NATIVE_SUPPORT) ? DI::l10n()->t('Connector Message') : false;
 
                $shareable    = in_array($conv->getProfileOwner(), [0, DI::userSession()->getLocalUserId()]) && $item['private'] != Item::PRIVATE;
-               $announceable = $shareable && in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::TWITTER, Protocol::TUMBLR]);
+               $announceable = $shareable && in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::TWITTER, Protocol::TUMBLR, Protocol::BLUESKY]);
                $commentable  = ($item['network'] != Protocol::TUMBLR);
 
                // On Diaspora only toplevel posts can be reshared