diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-17 10:55:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-17 11:42:50 +0200 |
commit | faa9d434b4d681837ff2a87603337c2623419669 (patch) | |
tree | 1f3c798dd6fd5f2dcbb019978f063f448c019974 /server/models | |
parent | 982f2fc9b42537ca40ff29bf62c1ca3692d4b587 (diff) | |
download | PeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.gz PeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.zst PeerTube-faa9d434b4d681837ff2a87603337c2623419669.zip |
Update server dependencies
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video-abuse.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index e0cf50b59..40f0ce12b 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts | |||
@@ -394,7 +394,7 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
394 | name: video.name, | 394 | name: video.name, |
395 | nsfw: video.nsfw, | 395 | nsfw: video.nsfw, |
396 | deleted: !this.Video, | 396 | deleted: !this.Video, |
397 | blacklisted: this.Video && this.Video.isBlacklisted(), | 397 | blacklisted: this.Video?.isBlacklisted() || false, |
398 | thumbnailPath: this.Video?.getMiniatureStaticPath(), | 398 | thumbnailPath: this.Video?.getMiniatureStaticPath(), |
399 | channel: this.Video?.VideoChannel.toFormattedJSON() || this.deletedVideo?.channel | 399 | channel: this.Video?.VideoChannel.toFormattedJSON() || this.deletedVideo?.channel |
400 | }, | 400 | }, |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 1f590c02d..b4efb76ee 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -1605,8 +1605,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | isBlocked () { | 1607 | isBlocked () { |
1608 | return (this.VideoChannel.Account.Actor.Server && this.VideoChannel.Account.Actor.Server.isBlocked()) || | 1608 | return this.VideoChannel.Account.Actor.Server?.isBlocked() || this.VideoChannel.Account.isBlocked() |
1609 | this.VideoChannel.Account.isBlocked() | ||
1610 | } | 1609 | } |
1611 | 1610 | ||
1612 | getQualityFileBy<T extends MVideoWithFile> (this: T, fun: (files: MVideoFile[], it: (file: MVideoFile) => number) => MVideoFile) { | 1611 | getQualityFileBy<T extends MVideoWithFile> (this: T, fun: (files: MVideoFile[], it: (file: MVideoFile) => number) => MVideoFile) { |