Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Sep 20, 2024
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
Loading