Skip to content

Commit

Permalink
[FIX] Call button visible even when chat is queued (#22943)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvjain99 authored and murtaza98 committed Nov 16, 2021
1 parent 4c1f1fc commit 1109e86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/webrtc/client/tabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { addAction } from '../../../client/views/room/lib/Toolbox';
import { APIClient } from '../../utils/client';

addAction('webRTCVideo', ({ room }) => {
const enabled = useSetting('WebRTC_Enabled') && (useSetting('Omnichannel_call_provider') === 'WebRTC');
const enabled = useSetting('WebRTC_Enabled') && (useSetting('Omnichannel_call_provider') === 'WebRTC') && room.servedBy;

const handleClick = useCallback(async (): Promise<void> => {
if (!room.callStatus || room.callStatus === 'declined' || room.callStatus === 'ended') {
Expand Down
3 changes: 3 additions & 0 deletions definition/IRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export interface IRoom extends IRocketChatRecord {
usersCount: number;
jitsiTimeout: Date;
callStatus?: CallStatus;
servedBy?: {
_id: string;
};

streamingOptions?: {
id?: string;
Expand Down

0 comments on commit 1109e86

Please sign in to comment.