From 126ed2bda5be4c7c5c101a5987100bfae17843ee Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Mon, 15 Jul 2024 15:19:08 +0100 Subject: [PATCH] Don't apply default `mentionAllMembers` permission when editing (#6032) --- .../src/components/home/GroupPermissionsEditor.svelte | 9 +++++---- .../app/src/components/home/addgroup/NewGroup.svelte | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/app/src/components/home/GroupPermissionsEditor.svelte b/frontend/app/src/components/home/GroupPermissionsEditor.svelte index 59229f1883..8b6611a196 100644 --- a/frontend/app/src/components/home/GroupPermissionsEditor.svelte +++ b/frontend/app/src/components/home/GroupPermissionsEditor.svelte @@ -5,6 +5,7 @@ import TabHeader from "../TabHeader.svelte"; import { i18nKey } from "../../i18n/i18n"; + export let editing: boolean; export let permissions: ChatPermissions; export let isPublic: boolean; export let isCommunityPublic: boolean; @@ -14,10 +15,10 @@ let overrideChatMessages = permissions.threadPermissions !== undefined; $: { - if (isPublic && isCommunityPublic) { - permissions.mentionAllMembers = "admin"; - } else { - permissions.mentionAllMembers = "member"; + if (!editing) { + permissions.mentionAllMembers = isPublic && isCommunityPublic + ? "admin" + : "member"; } } diff --git a/frontend/app/src/components/home/addgroup/NewGroup.svelte b/frontend/app/src/components/home/addgroup/NewGroup.svelte index a18e13cc6a..c7e94b0a96 100644 --- a/frontend/app/src/components/home/addgroup/NewGroup.svelte +++ b/frontend/app/src/components/home/addgroup/NewGroup.svelte @@ -331,6 +331,7 @@
{#if canEditPermissions}