Skip to content

Commit

Permalink
Fix bug: Display user roles in MessageAggregator when showRoles is true
Browse files Browse the repository at this point in the history
  • Loading branch information
dhairyashiil committed Jan 3, 2025
1 parent cb012e7 commit cf65c46
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import LoadingIndicator from './LoadingIndicator';
import NoMessagesIndicator from './NoMessageIndicator';
import FileDisplay from '../../FileMessage/FileMessage';
import useSetExclusiveState from '../../../hooks/useSetExclusiveState';
import { useRCContext } from '../../../context/RCInstance';

export const MessageAggregator = ({
title,
Expand All @@ -33,6 +34,8 @@ export const MessageAggregator = ({
const { theme } = useTheme();
const styles = getMessageAggregatorStyles(theme);
const setExclusiveState = useSetExclusiveState();
const { ECOptions } = useRCContext();
const showRoles = ECOptions?.showRoles;
const messages = useMessageStore((state) => state.messages);
const threadMessages = useMessageStore((state) => state.threadMessages) || [];
const allMessages = useMemo(
Expand Down Expand Up @@ -126,7 +129,7 @@ export const MessageAggregator = ({
type="default"
showAvatar
showToolbox={false}
showRoles={false}
showRoles={showRoles}
isInSidebar
style={{
flex: 1,
Expand Down

0 comments on commit cf65c46

Please sign in to comment.