From aa0357e06015a900aa6757ab9b0eef968eb02052 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 16 Jan 2022 03:35:30 +1100 Subject: messing around with things I don't understand --- webrtc/src/opcodes/Identify.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'webrtc/src/opcodes/Identify.ts') diff --git a/webrtc/src/opcodes/Identify.ts b/webrtc/src/opcodes/Identify.ts index 2026d7c9..6043a460 100644 --- a/webrtc/src/opcodes/Identify.ts +++ b/webrtc/src/opcodes/Identify.ts @@ -1,14 +1,17 @@ import { WebSocket } from "@fosscord/gateway"; import { Payload } from "./index" import { VoiceOPCodes } from "@fosscord/util"; +import { Server } from "../Server" -export async function onIdentify(socket: WebSocket, data: Payload) { +export async function onIdentify(this: Server, socket: WebSocket, data: Payload) { socket.send(JSON.stringify({ op: VoiceOPCodes.READY, d: { ssrc: 1, ip: "127.0.0.1", - port: 3005, + + //@ts-ignore + port: this.mediasoupTransports[0].iceCandidates.port, modes: [ "xsalsa20_poly1305", "xsalsa20_poly1305_suffix", -- cgit 1.5.1