Allow starting a call from existing thread (#2630)
This commit is contained in:
@@ -384,6 +384,16 @@ describe('main/windows/callsWidgetWindow', () => {
|
|||||||
expect(widgetWindow.getWidgetURL()).toBe(expected);
|
expect(widgetWindow.getWidgetURL()).toBe(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('getWidgetURL - with rootID', () => {
|
||||||
|
const config = {
|
||||||
|
...widgetConfig,
|
||||||
|
rootID: 'call_thread_id',
|
||||||
|
};
|
||||||
|
const widgetWindow = new CallsWidgetWindow(mainWindow, mainView, config);
|
||||||
|
const expected = `${mainView.serverInfo.server.url}plugins/${CALLS_PLUGIN_ID}/standalone/widget.html?call_id=${config.callID}&root_id=call_thread_id`;
|
||||||
|
expect(widgetWindow.getWidgetURL()).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
it('onShareScreen', () => {
|
it('onShareScreen', () => {
|
||||||
baseWindow.webContents = {
|
baseWindow.webContents = {
|
||||||
...baseWindow.webContents,
|
...baseWindow.webContents,
|
||||||
|
@@ -146,6 +146,9 @@ export default class CallsWidgetWindow extends EventEmitter {
|
|||||||
if (this.config.title) {
|
if (this.config.title) {
|
||||||
u.searchParams.append('title', this.config.title);
|
u.searchParams.append('title', this.config.title);
|
||||||
}
|
}
|
||||||
|
if (this.config.rootID) {
|
||||||
|
u.searchParams.append('root_id', this.config.rootID);
|
||||||
|
}
|
||||||
|
|
||||||
return u.toString();
|
return u.toString();
|
||||||
}
|
}
|
||||||
|
@@ -148,6 +148,7 @@ export class WindowManager {
|
|||||||
this.callsWidgetWindow = new CallsWidgetWindow(this.mainWindow!, currentView, {
|
this.callsWidgetWindow = new CallsWidgetWindow(this.mainWindow!, currentView, {
|
||||||
callID: msg.callID,
|
callID: msg.callID,
|
||||||
title: msg.title,
|
title: msg.title,
|
||||||
|
rootID: msg.rootID,
|
||||||
channelURL: msg.channelURL,
|
channelURL: msg.channelURL,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -3,14 +3,11 @@
|
|||||||
export type CallsWidgetWindowConfig = {
|
export type CallsWidgetWindowConfig = {
|
||||||
callID: string;
|
callID: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
rootID: string;
|
||||||
channelURL: string;
|
channelURL: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CallsJoinCallMessage = {
|
export type CallsJoinCallMessage = CallsWidgetWindowConfig;
|
||||||
callID: string;
|
|
||||||
title: string;
|
|
||||||
channelURL: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CallsWidgetResizeMessage = {
|
export type CallsWidgetResizeMessage = {
|
||||||
element: string;
|
element: string;
|
||||||
|
Reference in New Issue
Block a user