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

bug: Error when clicking on an audio element in a threaded reply (loadMessageIntoState is not a function)

Open tkrevh opened this issue 2 years ago • 2 comments

Describe the bug

When replying in a thread to a message containing only an audio recording, the reply contains the audio element, but it's not playable. Console says:

Uncaught (in promise) TypeError: d.state.loadMessageIntoState is not a function
    at stream-chat-react:formatted:54949:37
    at stream-chat-react:formatted:173:35
    at Object.next (stream-chat-react:formatted:186:18)
    at stream-chat-react:formatted:91:41
    at new Promise (<anonymous>)
    at u (stream-chat-react:formatted:68:16)
    at pe (stream-chat-react:formatted:54940:20)
    at onClick (stream-chat-react:formatted:39885:24)

To Reproduce

Steps to reproduce the behavior:

  1. Post an audio message to the channel
  2. The other chat member should reply in a thread
  3. The audio in the thread is not playable, as it results in the error in the console

Expected behavior

Audio should be played, same as if one would click on the original audio message. Or at least it should scroll to the original message.

Screenshots

2022-06-09 08_20_40-screenshot

Package version

  • stream-chat-react: latest (https://cdn.jsdelivr.net/npm/stream-chat-react)
  • stream-chat-css: latest
  • stream-chat-js: latest (https://cdn.jsdelivr.net/npm/stream-chat)

Desktop (please complete the following information):

Not relevant

Smartphone (please complete the following information):

Not relevant

Additional context

tkrevh avatar Jun 09 '22 06:06 tkrevh

Can confirm that this is a bug. We have recently implemented jumping to quoted message on click, and this affects the behavior of interactive content in the quoted message. Also, I think we don't support jumping to messages in threads yet as well, so we should disable that.

petyosi avatar Jun 09 '22 08:06 petyosi

@tkrevh I have tried to follow the 3 steps you described for reproduction. Could you please confirm I followed them correctly as I have not experienced any errors playing audio in the main message list neither in the thread?

Please see the video attached:

https://ctrlv.tv/0VMi

MartinCupela avatar Jun 09 '22 19:06 MartinCupela

Closing due to no reply from the author of the issue.

arnautov-anton avatar Sep 07 '22 21:09 arnautov-anton