From f44a0a6958a85fbd89bed74af89be5201d4b8372 Mon Sep 17 00:00:00 2001 From: plan5 <30434574+plan5@users.noreply.github.com> Date: Sun, 20 Aug 2023 17:59:25 +0200 Subject: [PATCH 1/2] Fix content URL reference for audio messages Before, the message could not be loaded and the undefined status of the content variable caused UI misbehavior. --- src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx b/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx index eecebf6..8b40270 100644 --- a/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx +++ b/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx @@ -266,7 +266,7 @@ function IRCLikeMessageItem({ text={content.body} duration={content.info.duration} size={content.info.size} - url={content.url.content_uri} + url={content.url} status={status} isFocused={isFocused} /> From 8b21c0b965892cde564b13ed337ab7c18a1689ff Mon Sep 17 00:00:00 2001 From: plan5 <30434574+plan5@users.noreply.github.com> Date: Sun, 20 Aug 2023 18:01:28 +0200 Subject: [PATCH 2/2] Remove autoplay attribute from audio tag in voice messages Before removing autoplay attribute from audio tag in voice messages, all preloaded voice messages would start playing simultaneously. The "false" string wasn't interpreted as a string and no autoplay is the default behaviour anyway. --- src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx b/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx index 8b40270..c4daae7 100644 --- a/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx +++ b/src/MessageItems/IRCLikeMessageItem/IRCLikeMessageItem.tsx @@ -186,7 +186,7 @@ function IRCLikeMessageItemAudio({ Duration: {createTextVNode(msToHigherScale(duration))}
Size: {createTextVNode(bytesToHigherScale(size))} -