From 0ed09ec06f593b483bcf769d8bab7e45f96a6d45 Mon Sep 17 00:00:00 2001 From: megrogan Date: Mon, 22 Apr 2024 12:22:24 +0100 Subject: [PATCH] Relax start video call permission for privat chats --- frontend/app/src/components/home/Home.svelte | 2 +- .../src/components/home/addgroup/NewGroup.svelte | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/app/src/components/home/Home.svelte b/frontend/app/src/components/home/Home.svelte index 9cb44b308a..7766e61577 100644 --- a/frontend/app/src/components/home/Home.svelte +++ b/frontend/app/src/components/home/Home.svelte @@ -949,7 +949,7 @@ inviteUsers: "admin", mentionAllMembers: "member", reactToMessages: "member", - startVideoCall: "admin", + startVideoCall: "member", messagePermissions: { default: "member", p2pSwap: "none", diff --git a/frontend/app/src/components/home/addgroup/NewGroup.svelte b/frontend/app/src/components/home/addgroup/NewGroup.svelte index 5a12c640d4..591157e5b3 100644 --- a/frontend/app/src/components/home/addgroup/NewGroup.svelte +++ b/frontend/app/src/components/home/addgroup/NewGroup.svelte @@ -73,6 +73,12 @@ $: hideInviteUsers = candidateGroup.level === "channel" && candidateGroup.public; $: valid = detailsValid && visibilityValid && rulesValid; + $: { + if (candidateGroup.public) { + candidateGroup.permissions.startVideoCall = "admin"; + } + } + function getSteps( editing: boolean, detailsValid: boolean, @@ -246,11 +252,10 @@ step = 0; } else if (!hideInviteUsers) { onGroupCreated(resp.canisterId); - optionallyInviteUsers(resp.canisterId) - .catch((_err) => { - toastStore.showFailureToast(i18nKey("inviteUsersFailed")); - step = 0; - }); + optionallyInviteUsers(resp.canisterId).catch((_err) => { + toastStore.showFailureToast(i18nKey("inviteUsersFailed")); + step = 0; + }); } else { onGroupCreated(resp.canisterId); }