Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread reply isn't removed immediately after hard delete #2478

Open
VictorSemenchuk opened this issue Feb 6, 2023 · 1 comment
Open

Thread reply isn't removed immediately after hard delete #2478

VictorSemenchuk opened this issue Feb 6, 2023 · 1 comment
Labels
🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK

Comments

@VictorSemenchuk
Copy link

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:

  1. Open a chat, create a thread for some of messages there and leave a reply message in the thread.
  2. Return back from the thread and then return back from the chat to the chat list.
  3. Open the chat once again and go to the thread you've created on the 1st step.
  4. 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

@nuno-vieira nuno-vieira added 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK 🐞 Bug An issue or PR related to a bug labels Feb 7, 2023
@nuno-vieira
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

No branches or pull requests

2 participants