Skip to content

Commit

Permalink
Merge branch 'RocketChat:develop' into fix-quoting-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
devanshkansagra authored Nov 14, 2024
2 parents 0548820 + 75f7760 commit ea1a8a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react/src/views/ChatHeader/ChatHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ const ChatHeader = ({
const dispatchToastMessage = useToastBarDispatch();
const getMessagesAndRoles = useFetchChatData(showRoles);
const setMessageLimit = useSettingsStore((state) => state.setMessageLimit);

const setMessages = useMessageStore((state) => state.setMessages);
const avatarUrl = useUserStore((state) => state.avatarUrl);
const setUserAvatarUrl = useUserStore((state) => state.setUserAvatarUrl);
const headerTitle = useMessageStore((state) => state.headerTitle);
const filtered = useMessageStore((state) => state.filtered);
const setFilter = useMessageStore((state) => state.setFilter);
Expand Down Expand Up @@ -128,6 +129,9 @@ const ChatHeader = ({
const handleLogout = useCallback(async () => {
try {
await RCInstance.logout();
setMessages([]);
setUserAvatarUrl(null);
useMessageStore.setState({ isMessageLoaded: false });
} catch (e) {
console.error(e);
} finally {
Expand Down

0 comments on commit ea1a8a9

Please sign in to comment.