]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-update.ts
Update sequelize
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-update.ts
index 0b96ba3526593b731f607fab94fd25b661911dda..54a9234bb16c0740fd111caa1b40ff281adbb419 100644 (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 })
     })