diff options
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r-- | server/lib/activitypub/actor.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 7862b0f00..5201bdeef 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -24,15 +24,17 @@ import { ActorFetchByUrlType, fetchActorByUrl } from '../../helpers/actor' | |||
24 | import { sequelizeTypescript } from '../../initializers/database' | 24 | import { sequelizeTypescript } from '../../initializers/database' |
25 | import { | 25 | import { |
26 | MAccount, | 26 | MAccount, |
27 | MAccountDefault, | ||
27 | MActor, | 28 | MActor, |
28 | MActorAccountChannelId, | 29 | MActorAccountChannelId, |
30 | MActorAccountChannelIdActor, | ||
29 | MActorAccountId, | 31 | MActorAccountId, |
30 | MActorDefault, | 32 | MActorDefault, |
31 | MActorFull, | 33 | MActorFull, |
34 | MActorFullActor, | ||
32 | MActorId, | 35 | MActorId, |
33 | MActorAccountChannelIdActor, | ||
34 | MChannel, | 36 | MChannel, |
35 | MActorFullActor, MAccountActorDefault, MChannelActorDefault, MChannelActorAccountDefault | 37 | MChannelAccountDefault |
36 | } from '../../typings/models' | 38 | } from '../../typings/models' |
37 | 39 | ||
38 | // Set account keys, this could be long so process after the account creation and do not block the client | 40 | // Set account keys, this could be long so process after the account creation and do not block the client |
@@ -374,12 +376,11 @@ function saveActorAndServerAndModelIfNotExist ( | |||
374 | }) | 376 | }) |
375 | 377 | ||
376 | if (actorCreated.type === 'Person' || actorCreated.type === 'Application') { | 378 | if (actorCreated.type === 'Person' || actorCreated.type === 'Application') { |
377 | actorCreated.Account = await saveAccount(actorCreated, result, t) as MAccountActorDefault | 379 | actorCreated.Account = await saveAccount(actorCreated, result, t) as MAccountDefault |
378 | actorCreated.Account.Actor = actorCreated | 380 | actorCreated.Account.Actor = actorCreated |
379 | } else if (actorCreated.type === 'Group') { // Video channel | 381 | } else if (actorCreated.type === 'Group') { // Video channel |
380 | actorCreated.VideoChannel = await saveVideoChannel(actorCreated, result, ownerActor, t) as MChannelActorAccountDefault | 382 | const channel = await saveVideoChannel(actorCreated, result, ownerActor, t) |
381 | actorCreated.VideoChannel.Actor = actorCreated | 383 | actorCreated.VideoChannel = Object.assign(channel, { Actor: actorCreated, Account: ownerActor.Account }) |
382 | actorCreated.VideoChannel.Account = ownerActor.Account | ||
383 | } | 384 | } |
384 | 385 | ||
385 | actorCreated.Server = server | 386 | actorCreated.Server = server |