2
1

actor.ts 420 B

12345678910111213
  1. import { ActorModel } from '../models/activitypub/actor'
  2. type ActorFetchByUrlType = 'all' | 'actor-and-association-ids'
  3. function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType) {
  4. if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url)
  5. if (fetchType === 'actor-and-association-ids') return ActorModel.loadByUrl(url)
  6. }
  7. export {
  8. ActorFetchByUrlType,
  9. fetchActorByUrl
  10. }