1
0
Fork 0
forked from gorb/backend

fix: return message struct to websocket connection

This commit is contained in:
Radical 2025-05-26 21:32:43 +02:00
parent efa0cd555f
commit bcb82d0f46

View file

@ -83,13 +83,13 @@ pub async fn echo(
Ok(AggregatedMessage::Text(text)) => { Ok(AggregatedMessage::Text(text)) => {
let mut conn = data.cache_pool.get_multiplexed_tokio_connection().await?; let mut conn = data.cache_pool.get_multiplexed_tokio_connection().await?;
redis::cmd("PUBLISH") let message = channel
.arg(&[channel_uuid.to_string(), text.to_string()]) .new_message(&mut data.pool.get().await?, uuid, text.to_string())
.exec_async(&mut conn)
.await?; .await?;
channel redis::cmd("PUBLISH")
.new_message(&mut data.pool.get().await.unwrap(), uuid, text.to_string()) .arg(&[channel_uuid.to_string(), serde_json::to_string(&message)?])
.exec_async(&mut conn)
.await?; .await?;
} }