diff --git a/client/src/data/messages.ts b/client/src/data/messages.ts index 586cd8d1..cb83dd49 100644 --- a/client/src/data/messages.ts +++ b/client/src/data/messages.ts @@ -55,6 +55,7 @@ export const useMessagesSubscription = (roomId?: string, opts: QueryOptions = De } if (message.updatedEntities?.includes('users')) { queryClient.invalidateQueries({ queryKey: ['users'] }) + queryClient.invalidateQueries({ queryKey: ['me'] }) } queryClient.setQueryData(['messages', message.roomId], (messages: Message[] | undefined) => { if (!messages) return diff --git a/client/src/features/room/organisms/ChatBox.tsx b/client/src/features/room/organisms/ChatBox.tsx index 2c398024..7dfbab64 100644 --- a/client/src/features/room/organisms/ChatBox.tsx +++ b/client/src/features/room/organisms/ChatBox.tsx @@ -1,5 +1,5 @@ import { Button, Icon, Textarea, Spinner, VStack, Alert, AlertIcon, Spacer } from '@chakra-ui/react' -import React, { useState, KeyboardEventHandler, useRef, useEffect } from 'react' +import React, { useState, KeyboardEventHandler, useRef, useEffect, ReactElement } from 'react' import { AiOutlineArrowRight } from 'react-icons/ai' import { usePostMessage } from '../../../data/messages' import { useJoinRoom } from '../../../data/rooms' @@ -23,7 +23,7 @@ const JoinAlert = ({ roomId, canJoin }: ChatBoxProps) => { return ( - You need to join this room to chat. + Join this room to chat.