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(); const targetName = targetPlayer.getName();
console.log('got the target name: ', targetName); console.log('got the target name: ', targetName);
const channelId = pSource + targetPlayer.source;
// target // target
// Sends information to the client: sourec, playerName, number, isTransmitter // Sends information to the client: sourec, playerName, number, isTransmitter
emitNet( emitNet(
@@ -47,7 +49,7 @@ onNet(events.PHONE_BEGIN_CALL, async (phoneNumber: string) => {
callerName, callerName,
phoneNumber, phoneNumber,
false, false,
pSource channelId
); );
// source // source
@@ -58,7 +60,7 @@ onNet(events.PHONE_BEGIN_CALL, async (phoneNumber: string) => {
targetName, targetName,
callerNumber, callerNumber,
true, true,
targetPlayer.source channelId
); );
} catch (e) { } catch (e) {
console.error(e); console.error(e);