[backnd/database] Don't try to parse UserProfile.MutedWords

This commit is contained in:
Laura Hausmann 2024-05-01 15:45:36 +02:00
parent 58ad080a99
commit f8301613e7
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 3 additions and 2 deletions

View file

@ -4568,7 +4568,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
.HasDefaultValueSql("'[]'::jsonb") .HasDefaultValueSql("'[]'::jsonb")
.HasComment("List of instances muted by the user."); .HasComment("List of instances muted by the user.");
b.Property<List<List<string>>>("MutedWords") b.Property<string>("MutedWords")
.IsRequired() .IsRequired()
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("jsonb") .HasColumnType("jsonb")

View file

@ -135,8 +135,9 @@ public class UserProfile
[Column("enableWordMute")] public bool EnableWordMute { get; set; } [Column("enableWordMute")] public bool EnableWordMute { get; set; }
//TODO: refactor this column (it's currently a List<string | string[]>, which is terrible)
[Column("mutedWords", TypeName = "jsonb")] [Column("mutedWords", TypeName = "jsonb")]
public List<List<string>> MutedWords { get; set; } = null!; public string MutedWords { get; set; } = null!;
/// <summary> /// <summary>
/// Whether reject index by crawler. /// Whether reject index by crawler.