diff options
Diffstat (limited to 'server/models/activitypub')
-rw-r--r-- | server/models/activitypub/actor.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 2fceb21dd..7d91e8a4a 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -34,7 +34,7 @@ import { ACTIVITY_PUB, ACTIVITY_PUB_ACTOR_TYPES, CONFIG, CONSTRAINTS_FIELDS } fr | |||
34 | import { AccountModel } from '../account/account' | 34 | import { AccountModel } from '../account/account' |
35 | import { AvatarModel } from '../avatar/avatar' | 35 | import { AvatarModel } from '../avatar/avatar' |
36 | import { ServerModel } from '../server/server' | 36 | import { ServerModel } from '../server/server' |
37 | import { throwIfNotValid } from '../utils' | 37 | import { isOutdated, throwIfNotValid } from '../utils' |
38 | import { VideoChannelModel } from '../video/video-channel' | 38 | import { VideoChannelModel } from '../video/video-channel' |
39 | import { ActorFollowModel } from './actor-follow' | 39 | import { ActorFollowModel } from './actor-follow' |
40 | import { VideoModel } from '../video/video' | 40 | import { VideoModel } from '../video/video' |
@@ -532,11 +532,6 @@ export class ActorModel extends Model<ActorModel> { | |||
532 | isOutdated () { | 532 | isOutdated () { |
533 | if (this.isOwned()) return false | 533 | if (this.isOwned()) return false |
534 | 534 | ||
535 | const now = Date.now() | 535 | return isOutdated(this, ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL) |
536 | const createdAtTime = this.createdAt.getTime() | ||
537 | const updatedAtTime = this.updatedAt.getTime() | ||
538 | |||
539 | return (now - createdAtTime) > ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL && | ||
540 | (now - updatedAtTime) > ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL | ||
541 | } | 536 | } |
542 | } | 537 | } |