+ actorId: actorInstanceCreated.id
+ } as FilteredModelAttributes<AccountModel>)
+
+ const accountInstanceCreated = await accountInstance.save({ transaction: t })
+ accountInstanceCreated.Actor = actorInstanceCreated
+
+ return accountInstanceCreated
+}
+
+async function createApplicationActor (applicationId: number) {
+ const accountCreated = await createLocalAccountWithoutKeys(SERVER_ACTOR_NAME, null, applicationId, undefined, 'Application')
+
+ accountCreated.Actor = await setAsyncActorKeys(accountCreated.Actor)