mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
Add chat credentials sending to server
This commit is contained in:
@@ -153,9 +153,9 @@
|
|||||||
background: #22252F;
|
background: #22252F;
|
||||||
color: #A9A99D;
|
color: #A9A99D;
|
||||||
border: none;
|
border: none;
|
||||||
width: 600px; /* или другое значение, которое вы хотите использовать */
|
width: 600px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
resize: none; /* Убирает ручку изменения размера */
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.write__content textarea:focus {
|
.write__content textarea:focus {
|
||||||
|
|||||||
@@ -43,12 +43,18 @@ export function SendMessageToChat(message) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const userCredentials = {
|
||||||
SpUserName: GetCookie("SpUserName"),
|
SearchToken: GetCookie("SearchToken"),
|
||||||
Message: message
|
AUTHTOKEN: GetCookie("AUTHTOKEN")
|
||||||
};
|
};
|
||||||
|
|
||||||
webSocket.send(JSON.stringify(data));
|
const messageObject = {
|
||||||
|
UserCredentials: userCredentials,
|
||||||
|
Message: message,
|
||||||
|
MessageType: "Chat"
|
||||||
|
};
|
||||||
|
|
||||||
|
webSocket.send(JSON.stringify(messageObject));
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error in ConnectToChat:', error);
|
console.error('Error in ConnectToChat:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user