send notification when starting call in non-voice rooms

This commit is contained in:
Ajay Bura
2026-05-07 13:59:31 +05:30
parent d5840ae37b
commit d086b31530
+9 -2
View File
@@ -70,9 +70,12 @@ export class CallEmbed {
);
}
static startingDMCall(intent: ElementCallIntent): boolean {
static startingCall(intent: ElementCallIntent): boolean {
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',
});
if (!room.isCallRoom() && CallEmbed.startingCall(intent)) {
params.append('sendNotificationType', CallEmbed.dmCall(intent) ? 'ring' : 'notification');
}
const widgetUrl = new URL(
`${trimTrailingSlash(import.meta.env.BASE_URL)}/public/element-call/index.html`,
window.location.origin