add capability to disable chat feature for groups/syncshells
This commit is contained in:
@@ -80,6 +80,9 @@ public class LightlessDbContext : DbContext
|
||||
.WithOne(p => p.Group)
|
||||
.HasForeignKey<GroupProfile>(p => p.GroupGID)
|
||||
.IsRequired(false);
|
||||
mb.Entity<Group>()
|
||||
.Property(g => g.ChatEnabled)
|
||||
.HasDefaultValue(true);
|
||||
mb.Entity<GroupPair>().ToTable("group_pairs");
|
||||
mb.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
|
||||
mb.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);
|
||||
|
||||
@@ -468,6 +468,11 @@ namespace LightlessSyncServer.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("prefer_disable_vfx");
|
||||
|
||||
b.Property<bool>("ChatEnabled")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("chat_enabled")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.HasKey("GID")
|
||||
.HasName("pk_groups");
|
||||
|
||||
|
||||
@@ -19,5 +19,6 @@ public class Group
|
||||
public bool PreferDisableSounds { get; set; }
|
||||
public bool PreferDisableAnimations { get; set; }
|
||||
public bool PreferDisableVFX { get; set; }
|
||||
public bool ChatEnabled { get; set; } = true;
|
||||
public DateTime CreatedDate { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user