]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/account.ts
Fix retrieving of deleted comments when subscribing to a new instance
[github/Chocobozzz/PeerTube.git] / server / models / account / account.ts
index 394a55f5e087b0128e1cb39f0940329213633aae..a818a5a4dfd8b4d310184b456acdbe37e0e0f460 100644 (file)
@@ -201,7 +201,7 @@ export class AccountModel extends Model<AccountModel> {
 
   @HasMany(() => VideoCommentModel, {
     foreignKey: {
-      allowNull: false
+      allowNull: true
     },
     onDelete: 'cascade',
     hooks: true
@@ -381,7 +381,7 @@ export class AccountModel extends Model<AccountModel> {
   }
 
   toActivityPubObject (this: MAccountAP) {
-    const obj = this.Actor.toActivityPubObject(this.name, 'Account')
+    const obj = this.Actor.toActivityPubObject(this.name)
 
     return Object.assign(obj, {
       summary: this.description