diff options
Diffstat (limited to 'server/lib/activitypub/videos')
-rw-r--r-- | server/lib/activitypub/videos/shared/abstract-builder.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/videos/updater.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/videos/shared/abstract-builder.ts b/server/lib/activitypub/videos/shared/abstract-builder.ts index 953710f6c..f8e4d6aa3 100644 --- a/server/lib/activitypub/videos/shared/abstract-builder.ts +++ b/server/lib/activitypub/videos/shared/abstract-builder.ts | |||
@@ -10,7 +10,7 @@ import { VideoLiveModel } from '@server/models/video/video-live' | |||
10 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 10 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
11 | import { MStreamingPlaylistFilesVideo, MThumbnail, MVideoCaption, MVideoFile, MVideoFullLight, MVideoThumbnail } from '@server/types/models' | 11 | import { MStreamingPlaylistFilesVideo, MThumbnail, MVideoCaption, MVideoFile, MVideoFullLight, MVideoThumbnail } from '@server/types/models' |
12 | import { ActivityTagObject, ThumbnailType, VideoObject, VideoStreamingPlaylistType } from '@shared/models' | 12 | import { ActivityTagObject, ThumbnailType, VideoObject, VideoStreamingPlaylistType } from '@shared/models' |
13 | import { getOrCreateActorAndServerAndModel } from '../../actor' | 13 | import { getOrCreateAPActor } from '../../actors' |
14 | import { | 14 | import { |
15 | getCaptionAttributesFromObject, | 15 | getCaptionAttributesFromObject, |
16 | getFileAttributesFromUrl, | 16 | getFileAttributesFromUrl, |
@@ -34,7 +34,7 @@ export abstract class APVideoAbstractBuilder { | |||
34 | throw new Error(`Video channel url ${channel.id} does not have the same host than video object id ${this.videoObject.id}`) | 34 | throw new Error(`Video channel url ${channel.id} does not have the same host than video object id ${this.videoObject.id}`) |
35 | } | 35 | } |
36 | 36 | ||
37 | return getOrCreateActorAndServerAndModel(channel.id, 'all') | 37 | return getOrCreateAPActor(channel.id, 'all') |
38 | } | 38 | } |
39 | 39 | ||
40 | protected tryToGenerateThumbnail (video: MVideoThumbnail): Promise<MThumbnail> { | 40 | protected tryToGenerateThumbnail (video: MVideoThumbnail): Promise<MThumbnail> { |
diff --git a/server/lib/activitypub/videos/updater.ts b/server/lib/activitypub/videos/updater.ts index 9e1c74969..6745e2efd 100644 --- a/server/lib/activitypub/videos/updater.ts +++ b/server/lib/activitypub/videos/updater.ts | |||
@@ -126,7 +126,7 @@ export class APVideoUpdater extends APVideoAbstractBuilder { | |||
126 | this.video.views = videoData.views | 126 | this.video.views = videoData.views |
127 | this.video.isLive = videoData.isLive | 127 | this.video.isLive = videoData.isLive |
128 | 128 | ||
129 | // Ensures we update the updated video attribute | 129 | // Ensures we update the updatedAt attribute, even if main attributes did not change |
130 | this.video.changed('updatedAt', true) | 130 | this.video.changed('updatedAt', true) |
131 | 131 | ||
132 | return this.video.save({ transaction }) as Promise<MVideoFullLight> | 132 | return this.video.save({ transaction }) as Promise<MVideoFullLight> |