]> git.mxchange.org Git - friendica-addons.git/commitdiff
Issue 14667: Pinned Bluesky feeds are fetched again
authorMichael <heluecht@pirati.ca>
Sun, 13 Apr 2025 06:12:02 +0000 (06:12 +0000)
committerPhilipp Holzer <nupplaphil@noreply.git.friendi.ca>
Sat, 3 May 2025 20:02:16 +0000 (22:02 +0200)
bluesky/bluesky.php

index ce6ddaf227e4aaaced0464be584dc46247fb5761..aef7156cd5c545b7a91689a45b1d27e6d0b72726 100644 (file)
@@ -1174,8 +1174,14 @@ function bluesky_get_feeds(int $uid): array
                return [];
        }
        foreach ($preferences->preferences as $preference) {
-               if ($preference->$type == 'app.bsky.actor.defs#savedFeedsPref') {
-                       return $preference->pinned ?? [];
+               if ($preference->$type == 'app.bsky.actor.defs#savedFeedsPrefV2') {
+                       $pinned = [];
+                       foreach ($preference->items as $item) {
+                               if (($item->type == 'feed') && $item->pinned) {
+                                       $pinned[] = $item->value;
+                               }
+                       }
+                       return $pinned;
                }
        }
        return [];