fix(chat): align typing WebSocket protocol with Chat Server
- startTyping/stopTyping now send { type: 'Typing', conversation_id, is_typing }
- Document JWT auth limitation (query param) for v0.302
This commit is contained in:
parent
bbbb02c4c3
commit
20e4278996
1 changed files with 4 additions and 3 deletions
|
|
@ -46,7 +46,8 @@ class WebSocketServiceImpl implements WebSocketService {
|
|||
return;
|
||||
}
|
||||
|
||||
// CORRECTION: Le serveur Rust expose le WebSocket sur /ws et requiert token en query (v0.101)
|
||||
// NOTE: Chat Server accepts token via ?token= (query) or Cookie access_token.
|
||||
// Query param exposes token in URL/logs — limitation documented for v0.302 (header auth).
|
||||
const baseUrl = (() => {
|
||||
const url = import.meta.env.VITE_WS_URL;
|
||||
if (!url) {
|
||||
|
|
@ -250,11 +251,11 @@ class WebSocketServiceImpl implements WebSocketService {
|
|||
}
|
||||
|
||||
startTyping(conversationId: string): void {
|
||||
this.send({ type: 'start_typing', conversation_id: conversationId });
|
||||
this.send({ type: 'Typing', conversation_id: conversationId, is_typing: true });
|
||||
}
|
||||
|
||||
stopTyping(conversationId: string): void {
|
||||
this.send({ type: 'stop_typing', conversation_id: conversationId });
|
||||
this.send({ type: 'Typing', conversation_id: conversationId, is_typing: false });
|
||||
}
|
||||
|
||||
addReaction(messageId: string, emoji: string): void {
|
||||
|
|
|
|||
Loading…
Reference in a new issue