From 0a0a61565e761b78ae4e39c0d1fb5f0489b37ecd Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sun, 12 Sep 2021 21:20:47 +0200 Subject: :bug: fix gateway --- gateway/src/events/Connection.ts | 5 +++-- gateway/src/events/Message.ts | 2 +- gateway/src/util/WebSocket.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gateway') diff --git a/gateway/src/events/Connection.ts b/gateway/src/events/Connection.ts index 625ceaa2..b9d2d6a1 100644 --- a/gateway/src/events/Connection.ts +++ b/gateway/src/events/Connection.ts @@ -1,4 +1,5 @@ -import WebSocket, { Server } from "@fosscord/gateway/util/WebSocket"; +import WS from "ws"; +import WebSocket from "@fosscord/gateway/util/WebSocket"; import { IncomingMessage } from "http"; import { Close } from "./Close"; import { Message } from "./Message"; @@ -18,7 +19,7 @@ try { // TODO: check msg max size export async function Connection( - this: Server, + this: WS.Server, socket: WebSocket, request: IncomingMessage ) { diff --git a/gateway/src/events/Message.ts b/gateway/src/events/Message.ts index 5c6bd2fc..66f98f1c 100644 --- a/gateway/src/events/Message.ts +++ b/gateway/src/events/Message.ts @@ -1,4 +1,4 @@ -import WebSocket, { Data } from "@fosscord/gateway/util/WebSocket"; +import WebSocket from "@fosscord/gateway/util/WebSocket"; var erlpack: any; try { erlpack = require("erlpack"); diff --git a/gateway/src/util/WebSocket.ts b/gateway/src/util/WebSocket.ts index 820cb1a3..15d1549f 100644 --- a/gateway/src/util/WebSocket.ts +++ b/gateway/src/util/WebSocket.ts @@ -1,6 +1,7 @@ import { Intents, Permissions } from "@fosscord/util"; import WS from "ws"; import { Deflate } from "zlib"; +import { Channel } from "amqplib"; interface WebSocket extends WS { version: number; -- cgit 1.4.1