fix: conference calls are shown as "not answered" after they end (#33179)

pull/33297/head^2
Pierre Lehnen 1 year ago committed by GitHub
parent 9c119a0abd
commit 599762739a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .changeset/five-coats-rhyme.md
  2. 1
      apps/uikit-playground/package.json
  3. 4
      apps/uikit-playground/vite.config.ts
  4. 25
      packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx

@ -0,0 +1,5 @@
---
'@rocket.chat/fuselage-ui-kit': patch
---
Fixed an error that incorrectly showed conference calls as not answered after they ended

@ -15,6 +15,7 @@
"@codemirror/lang-json": "^6.0.1",
"@codemirror/tooltip": "^0.19.16",
"@lezer/highlight": "^1.1.6",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "~0.31.25",
"@rocket.chat/fuselage": "^0.59.0",
"@rocket.chat/fuselage-hooks": "^0.33.1",

@ -7,11 +7,11 @@ export default defineConfig(() => ({
esbuild: {},
plugins: [react()],
optimizeDeps: {
include: ['@rocket.chat/ui-contexts', '@rocket.chat/message-parser'],
include: ['@rocket.chat/ui-contexts', '@rocket.chat/message-parser', '@rocket.chat/core-typings'],
},
build: {
commonjsOptions: {
include: [/ui-contexts/, /message-parser/, /node_modules/],
include: [/ui-contexts/, /core-typings/, /message-parser/, /node_modules/],
},
},
}));

@ -1,3 +1,4 @@
import { VideoConferenceStatus } from '@rocket.chat/core-typings';
import {
useGoToRoom,
useTranslation,
@ -133,9 +134,14 @@ const VideoConferenceBlock = ({
<VideoConfMessageButton onClick={callAgainHandler}>
{isUserCaller ? t('Call_again') : t('Call_back')}
</VideoConfMessageButton>
<VideoConfMessageFooterText>
{t('Call_was_not_answered')}
</VideoConfMessageFooterText>
{[
VideoConferenceStatus.EXPIRED,
VideoConferenceStatus.DECLINED,
].includes(data.status) && (
<VideoConfMessageFooterText>
{t('Call_was_not_answered')}
</VideoConfMessageFooterText>
)}
</>
)}
{data.type !== 'direct' &&
@ -151,16 +157,21 @@ const VideoConferenceBlock = ({
</VideoConfMessageFooterText>
</>
) : (
<VideoConfMessageFooterText>
{t('Call_was_not_answered')}
</VideoConfMessageFooterText>
[
VideoConferenceStatus.EXPIRED,
VideoConferenceStatus.DECLINED,
].includes(data.status) && (
<VideoConfMessageFooterText>
{t('Call_was_not_answered')}
</VideoConfMessageFooterText>
)
))}
</VideoConfMessageFooter>
</VideoConfMessage>
);
}
if (data.type === 'direct' && data.status === 0) {
if (data.type === 'direct' && data.status === VideoConferenceStatus.CALLING) {
return (
<VideoConfMessage>
<VideoConfMessageRow>

Loading…
Cancel
Save