From 292062d368ffdd55d802aeb4fcbe797869456235 Mon Sep 17 00:00:00 2001 From: Toomas Vahter Date: Mon, 25 Nov 2024 15:05:27 +0200 Subject: [PATCH] Fix batch deleting current user while it has muted users attached to it --- .../StreamChatModel.xcdatamodel/contents | 6 +++--- .../StreamChatTests/Database/DatabaseContainer_Tests.swift | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/StreamChat/Database/StreamChatModel.xcdatamodeld/StreamChatModel.xcdatamodel/contents b/Sources/StreamChat/Database/StreamChatModel.xcdatamodeld/StreamChatModel.xcdatamodel/contents index 181d663671..1b70c50a08 100644 --- a/Sources/StreamChat/Database/StreamChatModel.xcdatamodeld/StreamChatModel.xcdatamodel/contents +++ b/Sources/StreamChat/Database/StreamChatModel.xcdatamodeld/StreamChatModel.xcdatamodel/contents @@ -1,5 +1,5 @@ - + @@ -152,7 +152,7 @@ - + @@ -472,7 +472,7 @@ - + diff --git a/Tests/StreamChatTests/Database/DatabaseContainer_Tests.swift b/Tests/StreamChatTests/Database/DatabaseContainer_Tests.swift index 4d19d1e6e4..36836a666b 100644 --- a/Tests/StreamChatTests/Database/DatabaseContainer_Tests.swift +++ b/Tests/StreamChatTests/Database/DatabaseContainer_Tests.swift @@ -386,6 +386,9 @@ final class DatabaseContainer_Tests: XCTestCase { createdAt: .unique, updatedAt: .unique )) + let mutedUserId = UserId.unique + let mutedUserDTO = try session.saveUser(payload: .dummy(userId: mutedUserId)) + session.currentUser?.mutedUsers = Set([mutedUserDTO]) session.saveThreadList( payload: ThreadListPayload( threads: [