Skip to content

Commit

Permalink
disable mention dropdown for a group chat
Browse files Browse the repository at this point in the history
  • Loading branch information
roienatan committed Dec 13, 2023
1 parent a78d9b0 commit 31224db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ export default function ChatComponent({
users={users}
shouldReinitializeEditor={shouldReinitializeEditor}
onClearFinished={onClearFinished}
groupChat={chatChannel && chatChannel?.participants.length > 2}
/>
<button
className={styles.sendIcon}
Expand Down
6 changes: 5 additions & 1 deletion src/shared/ui-kit/TextEditor/BaseTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface TextEditorProps {
shouldReinitializeEditor: boolean;
onClearFinished: () => void;
elementStyles?: EditorElementStyles;
groupChat?: boolean;
}

const INITIAL_SEARCH_VALUE = {
Expand Down Expand Up @@ -94,6 +95,7 @@ const BaseTextEditor: FC<TextEditorProps> = (props) => {
shouldReinitializeEditor = false,
onClearFinished,
elementStyles,
groupChat,
} = props;
const editor = useMemo(
() =>
Expand Down Expand Up @@ -272,7 +274,9 @@ const BaseTextEditor: FC<TextEditorProps> = (props) => {
}}
/>

{target && chars.length > 0 && (
{/* For now, we don't support the ability to mention in a group chat.
See https://github.com/daostack/common-web/issues/2380 */}
{!groupChat && target && chars.length > 0 && (
<MentionDropdown
shouldFocusTarget={shouldFocusTarget}
onClick={(user: User) => {
Expand Down

0 comments on commit 31224db

Please sign in to comment.