send notification when starting call in non-voice rooms
This commit is contained in:
@@ -70,9 +70,12 @@ export class CallEmbed {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static startingDMCall(intent: ElementCallIntent): boolean {
|
static startingCall(intent: ElementCallIntent): boolean {
|
||||||
return (
|
return (
|
||||||
intent === ElementCallIntent.StartCallDM || intent === ElementCallIntent.StartCallDMVoice
|
intent === ElementCallIntent.StartCallDM ||
|
||||||
|
intent === ElementCallIntent.StartCallDMVoice ||
|
||||||
|
intent === ElementCallIntent.StartCall ||
|
||||||
|
intent === ElementCallIntent.StartCallVoice
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,6 +108,10 @@ export class CallEmbed {
|
|||||||
header: 'none',
|
header: 'none',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!room.isCallRoom() && CallEmbed.startingCall(intent)) {
|
||||||
|
params.append('sendNotificationType', CallEmbed.dmCall(intent) ? 'ring' : 'notification');
|
||||||
|
}
|
||||||
|
|
||||||
const widgetUrl = new URL(
|
const widgetUrl = new URL(
|
||||||
`${trimTrailingSlash(import.meta.env.BASE_URL)}/public/element-call/index.html`,
|
`${trimTrailingSlash(import.meta.env.BASE_URL)}/public/element-call/index.html`,
|
||||||
window.location.origin
|
window.location.origin
|
||||||
|
|||||||
Reference in New Issue
Block a user