aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 14:13:53 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 14:13:53 +0100
commit9f79ade627f0044606a9fbbe16ca0154661d12b9 (patch)
treeccfc1876da591bc52cbb4b8ccddedbeae7876679 /server/models/activitypub
parent0e0c745b62b2f18e228328e8c4f95b17e54f7a5e (diff)
downloadPeerTube-9f79ade627f0044606a9fbbe16ca0154661d12b9.tar.gz
PeerTube-9f79ade627f0044606a9fbbe16ca0154661d12b9.tar.zst
PeerTube-9f79ade627f0044606a9fbbe16ca0154661d12b9.zip
Refresh playlists
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor.ts9
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
34import { AccountModel } from '../account/account' 34import { AccountModel } from '../account/account'
35import { AvatarModel } from '../avatar/avatar' 35import { AvatarModel } from '../avatar/avatar'
36import { ServerModel } from '../server/server' 36import { ServerModel } from '../server/server'
37import { throwIfNotValid } from '../utils' 37import { isOutdated, throwIfNotValid } from '../utils'
38import { VideoChannelModel } from '../video/video-channel' 38import { VideoChannelModel } from '../video/video-channel'
39import { ActorFollowModel } from './actor-follow' 39import { ActorFollowModel } from './actor-follow'
40import { VideoModel } from '../video/video' 40import { 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}