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

Guard from watching a channel while already watched

Open vanGalilea opened this issue 1 year ago • 1 comments

Describe the bug Watching a channel while already watched causes issues. (double replied messages when replied to a deleted message)

To Reproduce Steps to reproduce the behavior:

  • Watch a channel that is already watched.
  1. Send a message.
  2. Compose a message that replies to the message (from step 1).
  3. Delete the message from step 1.
  4. retrieve channel messages.
  5. replied message (from step 2) will appear twice in that list.

Expected behavior No duplicate messages should appear

Additional context I suggest a warning when calling channel.watch when the message is already watched and to make sure we're not rewatching it.

vanGalilea avatar Mar 21 '23 16:03 vanGalilea