Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

add callnotification,callStartmsg,iframe code #617

Merged
merged 21 commits into from
Jul 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/Messages/MessageList/livechatCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ export const CallNotification = (props) => {
const [isframe, setIframe] = useState(false);
const [show, setShow] = useState(true);

const acceptClick = () => {
const acceptClick = async () => {
setShow(!{ show });
if (props.rid.t === 'jitsi_call_started') {
window.open(`https://meet.jit.si/xlkhe6qe6dyrlttkx${ props.rid.rid }`);
const result = await Livechat.videoCall(props.rid);
murtaza98 marked this conversation as resolved.
Show resolved Hide resolved
/* result:videoCall:
murtaza98 marked this conversation as resolved.
Show resolved Hide resolved
domain: "meet.jit.si"
provider: "jitsi"
rid: "uJiZ3P5nbG4XMdqJp"
room: "XLKhe6QE6dyRLtTkXuJiZ3P5nbG4XMdqJpRocketChat"
timeout: "2021-07-15T09:10:02.736Z"*/
window.open(`https://${ result.videoCall.domain }/${ result.videoCall.room }`);
return;
}
setIframe(true);
Expand Down