From 3ea1dff2203e614883579c18319976b12a4c898e Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 15 Feb 2021 08:02:05 +0100 Subject: [PATCH] :bug: fix permission dispatch --- package-lock.json | 4 ++-- src/listener/listener.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3d6effdf..30bee640 100644 --- a/package-lock.json +++ b/package-lock.json @@ -540,7 +540,7 @@ }, "node_modules/fosscord-server-util": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#7363f243ad9936466b97266592037ee0a5290c54", + "resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#2859daeba89e56683c60d99db0d6100fa4ac797d", "license": "ISC", "dependencies": { "jsonwebtoken": "^8.5.1", @@ -2202,7 +2202,7 @@ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, "fosscord-server-util": { - "version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#7363f243ad9936466b97266592037ee0a5290c54", + "version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#2859daeba89e56683c60d99db0d6100fa4ac797d", "from": "fosscord-server-util@github:fosscord/fosscord-server-util", "requires": { "jsonwebtoken": "^8.5.1", diff --git a/src/listener/listener.ts b/src/listener/listener.ts index caf0456d..24b05765 100644 --- a/src/listener/listener.ts +++ b/src/listener/listener.ts @@ -27,7 +27,7 @@ export async function dispatch(this: WebSocket, document: Event) { if (document.guild_id) { if (!this.intents.has("GUILDS")) return; const channel_id = document.channel_id || document.data?.channel_id; - permission = new Permissions(await getPermission(this.userid, document.guild_id, channel_id)); + permission = await getPermission(this.userid, document.guild_id, channel_id); } console.log("event", document);