don't need this
This commit is contained in:
parent
7b5dac445a
commit
11bb278c02
@ -56,9 +56,6 @@ export async function onIdentify(this: WebRtcWebSocket, data: VoicePayload) {
|
|||||||
if (voiceState) {
|
if (voiceState) {
|
||||||
type = voiceState.guild_id === server_id ? "guild-voice" : "dm-voice";
|
type = voiceState.guild_id === server_id ? "guild-voice" : "dm-voice";
|
||||||
authenticated = true;
|
authenticated = true;
|
||||||
this.guild_id =
|
|
||||||
type === "guild-voice" ? voiceState.guild_id : undefined;
|
|
||||||
this.channel_id = voiceState.channel_id;
|
|
||||||
} else {
|
} else {
|
||||||
// if its not a guild/dm voice connection, check if it is a go live stream
|
// if its not a guild/dm voice connection, check if it is a go live stream
|
||||||
const streamSession = await StreamSession.findOne({
|
const streamSession = await StreamSession.findOne({
|
||||||
@ -78,8 +75,6 @@ export async function onIdentify(this: WebRtcWebSocket, data: VoicePayload) {
|
|||||||
streamSession.used = true;
|
streamSession.used = true;
|
||||||
await streamSession.save();
|
await streamSession.save();
|
||||||
|
|
||||||
this.channel_id = streamSession.stream.channel_id;
|
|
||||||
|
|
||||||
this.once("close", async () => {
|
this.once("close", async () => {
|
||||||
await streamSession.remove();
|
await streamSession.remove();
|
||||||
});
|
});
|
||||||
|
@ -3,7 +3,5 @@ import type { WebRtcClient } from "spacebar-webrtc-types";
|
|||||||
|
|
||||||
export interface WebRtcWebSocket extends WebSocket {
|
export interface WebRtcWebSocket extends WebSocket {
|
||||||
type: "guild-voice" | "dm-voice" | "stream";
|
type: "guild-voice" | "dm-voice" | "stream";
|
||||||
guild_id?: string;
|
|
||||||
channel_id: string;
|
|
||||||
webRtcClient?: WebRtcClient<WebRtcWebSocket>;
|
webRtcClient?: WebRtcClient<WebRtcWebSocket>;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user