stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

reply_count from Thread did not remove deleted message when flag hideDeletedMessage is used

Open neopit opened this issue 1 year ago • 4 comments

Describe the bug

On a ThreadList (message list ...), it is possible to provide props for hiding the delete message (https://getstream.io/chat/docs/sdk/react/components/core-components/virtualized_list/#hidedeletedmessages).

When we enabled this feature then the reply_count counter is still returning the number of replies and continue to count deleted messages.

To Reproduce

  1. Configure the <Thread /> component for showing the deleted messages
  2. Create 2 messages in the <Thread />
  3. Now delete a message in the Thread -> a bubble indicates the message is deleted and the number of replies = 2

run the app again now with hideDeletedMessages=true on the <Thread /> component

  1. Configure the same <Thread /> (hideDeletedMessages=true) for hiding the delete message.
  2. Go back in the Thread (the bubble of the deleted messages disappeared) BUT the number of replies is still 2.

We expect to see only one reply because all deleted messages are hiding

Important: The MessageList shows as well the number of reply_count and it is incorrect on the message list as well.

Expected behavior

When the hideDeletedMessages is true then we expect reply_count to avoid counting deleted messages

Screenshots

If applicable, add screenshots to help explain your problem.

Package version

  • stream-chat-react: v10.7.2
  • stream-chat-css: N/A
  • stream-chat-js: N/A

Desktop (please complete the following information): All platforms, all browsers, all OS

Smartphone (please complete the following information):

  • All devices

Additional context

Screenshot 2023-03-15 at 2 54 51 PM Screenshot 2023-03-15 at 2 55 06 PM

neopit avatar Mar 15 '23 19:03 neopit