this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix federated feed only showing remote posts

There's a mismatch parameter between Mastodon's and Pixelfed's APIs

+9 -4
+8 -4
src/pages/public.jsx
··· 10 10 import { filteredItems } from '../utils/filters'; 11 11 import states from '../utils/states'; 12 12 import { saveStatus } from '../utils/states'; 13 + import supports from '../utils/supports'; 13 14 import useTitle from '../utils/useTitle'; 14 15 15 16 const LIMIT = 20; ··· 30 31 const publicIterator = useRef(); 31 32 async function fetchPublic(firstLoad) { 32 33 if (firstLoad || !publicIterator.current) { 33 - publicIterator.current = masto.v1.timelines.public.list({ 34 + const opts = { 34 35 limit: LIMIT, 35 - local: isLocal, 36 - remote: !isLocal, // Pixelfed 37 - }); 36 + local: isLocal || undefined, 37 + }; 38 + if (!isLocal && supports('@pixelfed/global-feed')) { 39 + opts.remote = true; 40 + } 41 + publicIterator.current = masto.v1.timelines.public.list(opts); 38 42 } 39 43 const results = await publicIterator.current.next(); 40 44 let { value } = results;
+1
src/utils/supports.js
··· 19 19 '@mastodon/profile-private-note': notContainPixelfed, 20 20 '@pixelfed/trending': containPixelfed, 21 21 '@pixelfed/home-include-reblogs': containPixelfed, 22 + '@pixelfed/global-feed': containPixelfed, 22 23 }; 23 24 const supportsCache = {}; 24 25