diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-22 16:15:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | 1297eb5db651a230474670c5da1517862fb9cc3e (patch) | |
tree | ecad4a0ceb0bb09e3c775262691ac68e9e0aca0c /server/lib/activitypub/video-comments.ts | |
parent | f6eebcb336c067e160a62020a5140d8d992ba384 (diff) | |
download | PeerTube-1297eb5db651a230474670c5da1517862fb9cc3e.tar.gz PeerTube-1297eb5db651a230474670c5da1517862fb9cc3e.tar.zst PeerTube-1297eb5db651a230474670c5da1517862fb9cc3e.zip |
Add refresh video on search
Diffstat (limited to 'server/lib/activitypub/video-comments.ts')
-rw-r--r-- | server/lib/activitypub/video-comments.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts index 14c7fde69..beff557bc 100644 --- a/server/lib/activitypub/video-comments.ts +++ b/server/lib/activitypub/video-comments.ts | |||
@@ -7,7 +7,7 @@ import { ActorModel } from '../../models/activitypub/actor' | |||
7 | import { VideoModel } from '../../models/video/video' | 7 | import { VideoModel } from '../../models/video/video' |
8 | import { VideoCommentModel } from '../../models/video/video-comment' | 8 | import { VideoCommentModel } from '../../models/video/video-comment' |
9 | import { getOrCreateActorAndServerAndModel } from './actor' | 9 | import { getOrCreateActorAndServerAndModel } from './actor' |
10 | import { getOrCreateAccountAndVideoAndChannel } from './videos' | 10 | import { getOrCreateVideoAndAccountAndChannel } from './videos' |
11 | import * as Bluebird from 'bluebird' | 11 | import * as Bluebird from 'bluebird' |
12 | 12 | ||
13 | async function videoCommentActivityObjectToDBAttributes (video: VideoModel, actor: ActorModel, comment: VideoCommentObject) { | 13 | async function videoCommentActivityObjectToDBAttributes (video: VideoModel, actor: ActorModel, comment: VideoCommentObject) { |
@@ -91,7 +91,7 @@ async function resolveThread (url: string, comments: VideoCommentModel[] = []) { | |||
91 | 91 | ||
92 | try { | 92 | try { |
93 | // Maybe it's a reply to a video? | 93 | // Maybe it's a reply to a video? |
94 | const { video } = await getOrCreateAccountAndVideoAndChannel(url) | 94 | const { video } = await getOrCreateVideoAndAccountAndChannel(url) |
95 | 95 | ||
96 | if (comments.length !== 0) { | 96 | if (comments.length !== 0) { |
97 | const firstReply = comments[ comments.length - 1 ] | 97 | const firstReply = comments[ comments.length - 1 ] |