diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-06 11:35:56 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-04-08 10:07:53 +0200 |
commit | f479685678406a5df864d89615b33d29085ebfc6 (patch) | |
tree | 8de15e90cd8d97d8810715df8585c61f48d5282a /server/lib/activitypub | |
parent | 968aaed2066873fc1c39f95168284122d9d15e21 (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
19 | import { MIMETYPES, WEBSERVER } from '../../initializers/constants' | 19 | import { MIMETYPES, WEBSERVER } from '../../initializers/constants' |
20 | import { sequelizeTypescript } from '../../initializers/database' | 20 | import { sequelizeTypescript } from '../../initializers/database' |
21 | import { AccountModel } from '../../models/account/account' | 21 | import { AccountModel } from '../../models/account/account' |
22 | import { ActorImageModel } from '../../models/account/actor-image' | ||
22 | import { ActorModel } from '../../models/activitypub/actor' | 23 | import { ActorModel } from '../../models/activitypub/actor' |
23 | import { AvatarModel } from '../../models/avatar/avatar' | ||
24 | import { ServerModel } from '../../models/server/server' | 24 | import { ServerModel } from '../../models/server/server' |
25 | import { VideoChannelModel } from '../../models/video/video-channel' | 25 | import { VideoChannelModel } from '../../models/video/video-channel' |
26 | import { | 26 | import { |
@@ -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 |