diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 14:13:53 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 14:13:53 +0100 |
commit | 9f79ade627f0044606a9fbbe16ca0154661d12b9 (patch) | |
tree | ccfc1876da591bc52cbb4b8ccddedbeae7876679 /server/models/activitypub | |
parent | 0e0c745b62b2f18e228328e8c4f95b17e54f7a5e (diff) | |
download | PeerTube-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.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 | } |