Skip to content

Commit

Permalink
Don't apply default mentionAllMembers permission when editing (#6032)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Jul 15, 2024
1 parent 59aa83d commit 126ed2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/app/src/components/home/addgroup/NewGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
<div use:menuCloser class="permissions" class:visible={step === 3}>
{#if canEditPermissions}
<GroupPermissionsEditor
{editing}
bind:permissions={candidateGroup.permissions}
isPublic={candidateGroup.public}
isCommunityPublic={$selectedCommunity?.public ?? true} />
Expand Down

0 comments on commit 126ed2b

Please sign in to comment.