diff --git a/app/soapbox/features/chats/components/chat.tsx b/app/soapbox/features/chats/components/chat.tsx index bd5a384a71..d99447671c 100644 --- a/app/soapbox/features/chats/components/chat.tsx +++ b/app/soapbox/features/chats/components/chat.tsx @@ -36,13 +36,15 @@ const Chat: React.FC = ({ chat, inputRef, className }) => { const submitMessage = () => { createChatMessage.mutate({ chatId: chat.id, content }, { - onError: (_error, _variables, context: any) => { - setContent(context.prevContent as string); - setErrorSubmittingMessage(true); - }, onSuccess: () => { setErrorSubmittingMessage(false); }, + onError: (error, _variables, context: any) => { + console.log(context); + + setContent(context.prevContent as string); + setErrorSubmittingMessage(true); + }, }); clearState();