aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-06 11:35:56 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-04-08 10:07:53 +0200
commitf479685678406a5df864d89615b33d29085ebfc6 (patch)
tree8de15e90cd8d97d8810715df8585c61f48d5282a /server/lib/activitypub
parent968aaed2066873fc1c39f95168284122d9d15e21 (diff)
downloadPeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.gz
PeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.zst
PeerTube-f479685678406a5df864d89615b33d29085ebfc6.zip
Agnostic actor image storage
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actor.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 3c9a7ba02..da831dcfd 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -19,8 +19,8 @@ import { getUrlFromWebfinger } from '../../helpers/webfinger'
19import { MIMETYPES, WEBSERVER } from '../../initializers/constants' 19import { MIMETYPES, WEBSERVER } from '../../initializers/constants'
20import { sequelizeTypescript } from '../../initializers/database' 20import { sequelizeTypescript } from '../../initializers/database'
21import { AccountModel } from '../../models/account/account' 21import { AccountModel } from '../../models/account/account'
22import { ActorImageModel } from '../../models/account/actor-image'
22import { ActorModel } from '../../models/activitypub/actor' 23import { ActorModel } from '../../models/activitypub/actor'
23import { AvatarModel } from '../../models/avatar/avatar'
24import { ServerModel } from '../../models/server/server' 24import { ServerModel } from '../../models/server/server'
25import { VideoChannelModel } from '../../models/video/video-channel' 25import { VideoChannelModel } from '../../models/video/video-channel'
26import { 26import {
@@ -183,7 +183,7 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
183 } 183 }
184 } 184 }
185 185
186 const avatar = await AvatarModel.create({ 186 const avatar = await ActorImageModel.create({
187 filename: info.name, 187 filename: info.name,
188 onDisk: info.onDisk, 188 onDisk: info.onDisk,
189 fileUrl: info.fileUrl 189 fileUrl: info.fileUrl
@@ -378,7 +378,7 @@ function saveActorAndServerAndModelIfNotExist (
378 378
379 // Avatar? 379 // Avatar?
380 if (result.avatar) { 380 if (result.avatar) {
381 const avatar = await AvatarModel.create({ 381 const avatar = await ActorImageModel.create({
382 filename: result.avatar.name, 382 filename: result.avatar.name,
383 fileUrl: result.avatar.fileUrl, 383 fileUrl: result.avatar.fileUrl,
384 onDisk: false 384 onDisk: false