Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax start video call permission for privat chats #5709

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/src/components/home/Home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@
inviteUsers: "admin",
mentionAllMembers: "member",
reactToMessages: "member",
startVideoCall: "admin",
startVideoCall: "member",
messagePermissions: {
default: "member",
p2pSwap: "none",
Expand Down
15 changes: 10 additions & 5 deletions frontend/app/src/components/home/addgroup/NewGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down
Loading