import { ActorLoadByUrlType } from '@server/lib/model-loaders'
import { ActorModel } from '@server/models/actor/actor'
import { MActorAccountChannelId, MActorFull } from '@server/types/models'
-import { HttpStatusCode } from '@shared/core-utils'
+import { HttpStatusCode } from '@shared/models'
import { fetchRemoteActor } from './shared'
import { APActorUpdater } from './updater'
import { getUrlFromWebfinger } from './webfinger'
const { actorObject } = await fetchRemoteActor(actorUrl)
if (actorObject === undefined) {
- logger.warn('Cannot fetch remote actor in refresh actor.')
+ logger.info('Cannot fetch remote actor %s in refresh actor.', actorUrl)
return { actor, refreshed: false }
}
return { actor: undefined, refreshed: false }
}
- logger.warn('Cannot refresh actor %s.', actor.url, { err, ...lTags() })
+ logger.info('Cannot refresh actor %s.', actor.url, { err, ...lTags() })
return { actor, refreshed: false }
}
}
function getActorUrl (actor: MActorFull) {
return getUrlFromWebfinger(actor.preferredUsername + '@' + actor.getHost())
.catch(err => {
- logger.warn('Cannot get actor URL from webfinger, keeping the old one.', err)
+ logger.warn('Cannot get actor URL from webfinger, keeping the old one.', { err })
return actor.url
})
}