summary refs log tree commit diff
path: root/src/gateway/opcodes/RequestChannelStatuses.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway/opcodes/RequestChannelStatuses.ts')
-rw-r--r--src/gateway/opcodes/RequestChannelStatuses.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gateway/opcodes/RequestChannelStatuses.ts b/src/gateway/opcodes/RequestChannelStatuses.ts

index 533ece22..1747faae 100644 --- a/src/gateway/opcodes/RequestChannelStatuses.ts +++ b/src/gateway/opcodes/RequestChannelStatuses.ts
@@ -16,12 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { WebSocket, Payload, OPCODES, Send } from "@spacebar/gateway"; +import { WebSocket, Payload, OPCODES, Send, handleOffloadedGatewayRequest } from "@spacebar/gateway"; +import { Config } from "@spacebar/util"; export async function onRequestChannelStatuses(this: WebSocket, { d }: Payload) { // Schema validation can only accept either string or array, so transforming it here to support both if (!d.guild_id) throw new Error('"guild_id" is required'); + if (Config.get().offload.gateway.channelStatusesUrl !== null) { + return await handleOffloadedGatewayRequest(this, Config.get().offload.gateway.channelStatusesUrl!, d); + } + // TODO: implement await Send(this, { op: OPCODES.Dispatch,