fix chat list image taken from the clicked card instead of the chat
createOrGetChat stored the clicked card's post for the returned chat id, even when the backend returned an existing chat about another ad. The chat then showed the new ad's image until the next list fetch replaced it with the real one. The backend's chat.post is now the source of truth; card data only adds the emoji for the same ad. Also limit the chat input to 4000 characters, matching the backend. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// Тот же лимит, что ChatService.MAX_MESSAGE_LENGTH на бэкенде
|
||||
const MAX_MESSAGE_LENGTH = 4000;
|
||||
|
||||
export default function ChatInputBar({
|
||||
input,
|
||||
onInputChange,
|
||||
@@ -13,6 +16,7 @@ export default function ChatInputBar({
|
||||
onChange={(e) => onInputChange(e.target.value)}
|
||||
placeholder={placeholder}
|
||||
className="chat-input"
|
||||
maxLength={MAX_MESSAGE_LENGTH}
|
||||
/>
|
||||
<button type="submit" className="chat-send-btn" disabled={!connected}>
|
||||
➤
|
||||
|
||||
Reference in New Issue
Block a user