vani-meeting-server 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ServerHandler.js
CHANGED
|
@@ -45,6 +45,7 @@ class ServerHandler {
|
|
|
45
45
|
const tempParticipant = new Participant_1.Participant();
|
|
46
46
|
tempParticipant.userId = (0, uuid_1.v4)();
|
|
47
47
|
const clientMessageBody = { shouldSendToSelf: true, senderParticipant: tempParticipant, interfaceName: 'ClientMessageBody', broadcastMessage: { type: EachSocketConnectionHandler_1.WebSocketBasicEvents.Message, data: messagePayload, interfaceName: 'WebSocketMessageBody' } };
|
|
48
|
+
console.log(clientMessageBody);
|
|
48
49
|
RedisHandler_1.RedisHandler.getInstance().redisPublisher.publish(messagePayload.to, JSON.stringify(clientMessageBody));
|
|
49
50
|
}
|
|
50
51
|
async getAllParticipatnsForRoomId(roomId) {
|
|
@@ -375,9 +375,11 @@ class EachSocketConnectionHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
async sendMessageToClient(data) {
|
|
378
|
+
console.log("sendMessageToClient", data);
|
|
378
379
|
if ((data.shouldSendToSelf === true || this.selfParticipant?.userId !== data.senderParticipant.userId) && this.isActive && this.socket.OPEN) {
|
|
379
380
|
const sendMessageData = { type: data.broadcastMessage.type, data: { message: data.broadcastMessage.data } };
|
|
380
381
|
this.socket.send(JSON.stringify(sendMessageData));
|
|
382
|
+
console.log("sendMessageToClient sent", data);
|
|
381
383
|
}
|
|
382
384
|
}
|
|
383
385
|
async onRedisMessage(data) {
|