Update sequelize

This commit is contained in:
Chocobozzz
2019-04-18 11:28:17 +02:00
parent e8bafea35b
commit 1735c82572
46 changed files with 389 additions and 421 deletions

View File

@@ -37,7 +37,9 @@ async function processFollow (actor: ActorModel, targetActorURL: string) {
if (isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.ENABLED === false) {
logger.info('Rejecting %s because instance followers are disabled.', targetActor.url)
return sendReject(actor, targetActor)
await sendReject(actor, targetActor)
return { actorFollow: undefined }
}
const [ actorFollow, created ] = await ActorFollowModel.findOrCreate({

View File

@@ -120,9 +120,11 @@ async function processUpdateActor (actor: ActorModel, activity: ActivityUpdate)
await actor.save({ transaction: t })
accountOrChannelInstance.set('name', actorAttributesToUpdate.name || actorAttributesToUpdate.preferredUsername)
accountOrChannelInstance.set('description', actorAttributesToUpdate.summary)
accountOrChannelInstance.set('support', actorAttributesToUpdate.support)
accountOrChannelInstance.name = actorAttributesToUpdate.name || actorAttributesToUpdate.preferredUsername
accountOrChannelInstance.description = actorAttributesToUpdate.summary
if (accountOrChannelInstance instanceof VideoChannelModel) accountOrChannelInstance.support = actorAttributesToUpdate.support
await accountOrChannelInstance.save({ transaction: t })
})