mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
feat(calling/server): setting unique channel id
This commit is contained in:
1 parent
7cc3a47f7b
commit
e5604bd544
1 file changed
+4
-2
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user