Small refactor. JoinExisting works for starting a call/joining a voice room.

This commit is contained in:
Rawrington committed 2026-03-22 23:54:19 +00:00
1 parent a3fda5a13c
commit 2283cd6711
1 file changed
+7 -3
+7 -3
View File
@@ -53,11 +53,15 @@ export class CallEmbed {
private readonly disposables: Array<() => void> = [];
static getIntent(dm: boolean, ongoing: boolean, video: boolean): ElementCallIntent {
if (ongoing) {
return !video ? ElementCallIntent.JoinExistingDMVoice : (dm ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExisting);
if (!dm) {
return video ? ElementCallIntent.JoinExisting : ElementCallIntent.JoinExistingDMVoice;
}
return !video ? (dm ? ElementCallIntent.StartCallDMVoice : ElementCallIntent.JoinExistingDMVoice) : (dm ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCall);
if (ongoing) {
return video ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExistingDMVoice;
}
return video ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCallDMVoice;
}
static getWidget(