mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +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();
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user