Automatically remove bad followings
[oweals/peertube.git] / server / models / activitypub / actor.ts
index 4a466441cd98a73c034ace260279a884d38aeb34..bd6a2c8fdbf712bdfb942f4a6412de2b14663fc5 100644 (file)
@@ -7,13 +7,11 @@ import {
   Column,
   CreatedAt,
   DataType,
-  Default,
   DefaultScope,
   ForeignKey,
   HasMany,
   HasOne,
   Is,
-  IsUUID,
   Model,
   Scopes,
   Table,
@@ -119,10 +117,6 @@ export const unusedActorAttributesForAPI = [
     {
       fields: [ 'avatarId' ]
     },
-    {
-      fields: [ 'uuid' ],
-      unique: true
-    },
     {
       fields: [ 'followersUrl' ]
     }
@@ -134,12 +128,6 @@ export class ActorModel extends Model<ActorModel> {
   @Column(DataType.ENUM(...values(ACTIVITY_PUB_ACTOR_TYPES)))
   type: ActivityPubActorType
 
-  @AllowNull(false)
-  @Default(DataType.UUIDV4)
-  @IsUUID(4)
-  @Column(DataType.UUID)
-  uuid: string
-
   @AllowNull(false)
   @Is('ActorPreferredUsername', value => throwIfNotValid(value, isActorPreferredUsernameValid, 'actor preferred username'))
   @Column
@@ -408,7 +396,6 @@ export class ActorModel extends Model<ActorModel> {
     return {
       id: this.id,
       url: this.url,
-      uuid: this.uuid,
       name: this.preferredUsername,
       host: this.getHost(),
       hostRedundancyAllowed: this.getRedundancyAllowed(),
@@ -454,7 +441,6 @@ export class ActorModel extends Model<ActorModel> {
       endpoints: {
         sharedInbox: this.sharedInboxUrl
       },
-      uuid: this.uuid,
       publicKey: {
         id: this.getPublicKeyUrl(),
         owner: this.url,