Issue 14667: Pinned Bluesky feeds are fetched again

develop^2
Michael 2025-04-13 06:12:02 +00:00 committed by Philipp Holzer
parent d95137ce6b
commit 2289fdc97e
1 changed files with 8 additions and 2 deletions

View 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 [];