Thread reply isn't removed immediately after hard delete
What did you do?
Precondition: I'm using StreamChatUI. I've implemented a custom message delete action (confirms to ChatMessageActionItem protocol) which performs hard delete of message instead of soft delete.
Steps to reproduce:
- Open a chat, create a thread for some of messages there and leave a reply message in the thread.
- Return back from the thread and then return back from the chat to the chat list.
- Open the chat once again and go to the thread you've created on the 1st step.
- Perform hard delete of your reply message which you left on the 1st step.
What did you expect to happen?
The reply message is completely removed (from remote and local storage). In the chat I don't see "Reply" button under the message bubble (a parent message of the created thread on the 1st step).
What happened instead?
The reply message is just marked as deleting. It's removed from backend, but it's not removed from local storage (Core Data).
It looks like channel property is nil for removing message. MessageRepository.saveSuccessfullyDeletedMessage implementation expects channel is not nil for deleting message. Since it's nil, the method can't completely remove the message from the local storage and the message just exists with deleting localMessageState.
GetStream Environment
GetStream Chat version: 4.25.0 GetStream Chat frameworks: StreamChat, StreamChatUI iOS version: 16.2 Swift version: 5.6 Xcode version: 14.2 Device: iPhone 14 Pro
Hi @VictorSemenchuk!
This is a known issue that we are tracking internally. For now we don't have an ETA, but I'll let you know once we start picking up this work 👍
Best, Nuno