From 1735c825726edaa0af5035cb6cbb0cc0db502c6d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Apr 2019 11:28:17 +0200 Subject: Update sequelize --- server/lib/activitypub/process/process-follow.ts | 4 +++- server/lib/activitypub/process/process-update.ts | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'server/lib/activitypub/process') diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index ac3dd6ac4..ed16ba172 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts @@ -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({ diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 0b96ba352..54a9234bb 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts @@ -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 }) }) -- cgit v1.2.3