mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added code for listening event doubleGame, but he dont work
This commit is contained in:
@@ -23,6 +23,7 @@ export function ConnectToChat() {
|
||||
|
||||
try {
|
||||
const dataObject = JSON.parse(event.data);
|
||||
console.log(dataObject)
|
||||
|
||||
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
||||
eventBus.emit('dataChat', event.data);
|
||||
@@ -40,6 +41,12 @@ export function ConnectToChat() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dataObject.MessageType == 'DoubleGameState') {
|
||||
eventBus.emit('doubleGame', event.data)
|
||||
console.log('data')
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
void(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user