feat(calling/server): setting unique channel id

This commit is contained in:
Christopher committed 2021-01-17 22:29:55 +01:00
1 parent 7cc3a47f7b
commit e5604bd544
1 file changed
+4 -2
+4 -2
View File
@@ -39,6 +39,8 @@ onNet(events.PHONE_BEGIN_CALL, async (phoneNumber: string) => {
const targetName = targetPlayer.getName();
console.log('got the target name: ', targetName);
const channelId = pSource + targetPlayer.source;
// target
// Sends information to the client: sourec, playerName, number, isTransmitter
emitNet(
@@ -47,7 +49,7 @@ onNet(events.PHONE_BEGIN_CALL, async (phoneNumber: string) => {
callerName,
phoneNumber,
false,
pSource
channelId
);
// source
@@ -58,7 +60,7 @@ onNet(events.PHONE_BEGIN_CALL, async (phoneNumber: string) => {
targetName,
callerNumber,
true,
targetPlayer.source
channelId
);
} catch (e) {
console.error(e);