Skip to content

Commit

Permalink
fix: conference calls are shown as "not answered" after they end (#33179
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pierre-lehnen-rc authored Sep 20, 2024
1 parent 9c119a0 commit 5997627
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-coats-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/fuselage-ui-kit': patch
---

Fixed an error that incorrectly showed conference calls as not answered after they ended
1 change: 1 addition & 0 deletions apps/uikit-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions apps/uikit-playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/],
},
},
}));
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { VideoConferenceStatus } from '@rocket.chat/core-typings';
import {
useGoToRoom,
useTranslation,
Expand Down Expand Up @@ -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' &&
Expand All @@ -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>
Expand Down

0 comments on commit 5997627

Please sign in to comment.