]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/user/user.ts
Don't fail remote transcoding on retry
[github/Chocobozzz/PeerTube.git] / server / models / user / user.ts
index b6b120c92a0b069511bb927c9da670c9aa54ca9e..4f6a8fce442ad64340ca101e296a1f80cd1543fd 100644 (file)
@@ -404,6 +404,11 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
   @Column
   lastLoginDate: Date
 
+  @AllowNull(false)
+  @Default(false)
+  @Column
+  emailPublic: boolean
+
   @AllowNull(true)
   @Default(null)
   @Column
@@ -550,6 +555,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
                   model: ActorFollowModel.unscoped(),
                   required: true,
                   where: {
+                    state: 'accepted',
                     targetActorId: actorId
                   }
                 }
@@ -879,6 +885,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
       theme: getThemeOrDefault(this.theme, DEFAULT_USER_THEME_NAME),
 
       pendingEmail: this.pendingEmail,
+      emailPublic: this.emailPublic,
       emailVerified: this.emailVerified,
 
       nsfwPolicy: this.nsfwPolicy,