mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
possible solution for accepting call
This commit is contained in:
1 parent
e5604bd544
commit
8d100a5ebd
3 files changed
+10
-6
No files matched your search
@@ -77,10 +77,14 @@ onNet(events.PHONE_ACCEPT_CALL, async (phoneNumber: string) => {
|
||||
const targetIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
|
||||
const targetPlayer = await getPlayerFromIdentifier(targetIdentifier);
|
||||
|
||||
const channelId = pSource + targetPlayer.source;
|
||||
|
||||
// client that is calling
|
||||
emitNet('phone:callAccepted', pSource, targetPlayer.source);
|
||||
emitNet('phone:callAccepted', pSource, channelId);
|
||||
|
||||
// client that is being called
|
||||
emitNet('phone:callAccepted', targetPlayer.source, pSource);
|
||||
} catch (error) {}
|
||||
emitNet('phone:callAccepted', targetPlayer.source, channelId);
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user