fix: message sending fallback + iOS zoom on input + openOrCreatePrivate
- MessageInput: HTTP fallback when WebSocket not OPEN (prevents silent failures) - WsClient: add trySend() returning bool to detect WS availability - Backend: POST /api/messages/chat/:chatId endpoint for HTTP message send - openOrCreatePrivate: use openChat() for consistency after refreshing chat list - iOS fix: inputs get font-size:16px on mobile to prevent Safari auto-zoom Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,14 @@ class WsClient {
|
||||
}
|
||||
}
|
||||
|
||||
trySend(type: string, payload: any): boolean {
|
||||
if (this.ws?.readyState === WebSocket.OPEN) {
|
||||
this.ws.send(JSON.stringify({ type, payload }));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.token = null;
|
||||
if (this.reconnectTimer) clearTimeout(this.reconnectTimer);
|
||||
|
||||
Reference in New Issue
Block a user