import { ServerModel } from '../../models/server/server'
import { VideoChannelModel } from '../../models/video/video-channel'
import { JobQueue } from '../job-queue'
-import { getServerActor } from '../../helpers/utils'
import { ActorFetchByUrlType, fetchActorByUrl } from '../../helpers/actor'
import { sequelizeTypescript } from '../../initializers/database'
import {
MActorFullActor,
MActorId,
MChannel
-} from '../../typings/models'
+} from '../../types/models'
import { extname } from 'path'
+import { getServerActor } from '@server/models/application/application'
// Set account keys, this could be long so process after the account creation and do not block the client
function setAsyncActorKeys <T extends MActor> (actor: T) {
actorInstance.followersUrl = attributes.followers
actorInstance.followingUrl = attributes.following
- if (attributes.endpoints && attributes.endpoints.sharedInbox) {
+ if (attributes.endpoints?.sharedInbox) {
actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
}
}
followersUrl: actorJSON.followers,
followingUrl: actorJSON.following,
- sharedInboxUrl: actorJSON.endpoints && actorJSON.endpoints.sharedInbox
+ sharedInboxUrl: actorJSON.endpoints?.sharedInbox
? actorJSON.endpoints.sharedInbox
: null
})