stream-chat-react
stream-chat-react copied to clipboard
bug: Error when clicking on an audio element in a threaded reply (loadMessageIntoState is not a function)
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:
- Post an audio message to the channel
- The other chat member should reply in a thread
- 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
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
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.
@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
Closing due to no reply from the author of the issue.