From 304d37ded7abf7d124ae707601854ead3f1ddbcb Mon Sep 17 00:00:00 2001 From: core Date: Thu, 20 Jul 2023 19:13:59 -0400 Subject: [PATCH] fix websocket worker so it stops sending thigns in discord from discord --- websocket-worker/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/websocket-worker/src/main.rs b/websocket-worker/src/main.rs index 39c702e..74d4798 100644 --- a/websocket-worker/src/main.rs +++ b/websocket-worker/src/main.rs @@ -9,6 +9,7 @@ use url::Url; use websocket::{ClientBuilder, Message, OwnedMessage, WebSocketError}; use websocket::websocket_base::result::WebSocketResult; use common::message::{GatewayChatMessage, GatewayPacketC2S, GatewayPacketS2C}; +use common::message::GatewayChatSource::Discord; use common::status::{DATA_API_VERSION, Status}; use crate::config::Config; @@ -80,6 +81,7 @@ async fn main() -> Result<(), Box> { } GatewayPacketS2C::Relayed { msg } => { info!("msg: {:?}", msg); + if matches!(msg.source, Discord) { continue; } for wh in &config.websockets { tokio::spawn({ let wh_clone = wh.clone();