+ if (byActorFull.type === 'Person') {
+ if (!byActorFull.Account) throw new Error('Actor ' + byActorFull.url + ' is a person but we cannot find it in database.')
+
+ const accountToDelete = byActorFull.Account as MAccountActor
+ accountToDelete.Actor = byActorFull
+
+ return retryTransactionWrapper(processDeleteAccount, accountToDelete)
+ } else if (byActorFull.type === 'Group') {
+ if (!byActorFull.VideoChannel) throw new Error('Actor ' + byActorFull.url + ' is a group but we cannot find it in database.')
+
+ const channelToDelete = byActorFull.VideoChannel as MChannelActorAccountActor
+ channelToDelete.Actor = byActorFull
+
+ return retryTransactionWrapper(processDeleteVideoChannel, channelToDelete)