pleroma/app/soapbox/api/hooks/streaming/useRemoteStream.ts
2023-07-22 13:16:01 -05:00

15 lines
No EOL
394 B
TypeScript

import { useTimelineStream } from './useTimelineStream';
interface UseRemoteStreamOpts {
instance: string
onlyMedia?: boolean
}
function useRemoteStream({ instance, onlyMedia }: UseRemoteStreamOpts) {
return useTimelineStream(
`remote${onlyMedia ? ':media' : ''}:${instance}`,
`public:remote${onlyMedia ? ':media' : ''}&instance=${instance}`,
);
}
export { useRemoteStream };