pleroma/app/soapbox/api/hooks/streaming/useCommunityStream.ts

14 lines
No EOL
351 B
TypeScript

import { useTimelineStream } from './useTimelineStream';
interface UseCommunityStreamOpts {
onlyMedia?: boolean
}
function useCommunityStream({ onlyMedia }: UseCommunityStreamOpts = {}) {
return useTimelineStream(
`community${onlyMedia ? ':media' : ''}`,
`public:local${onlyMedia ? ':media' : ''}`,
);
}
export { useCommunityStream };