fix: return message struct to websocket connection
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

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)) => {
let mut conn = data.cache_pool.get_multiplexed_tokio_connection().await?;
redis::cmd("PUBLISH")
.arg(&[channel_uuid.to_string(), text.to_string()])
.exec_async(&mut conn)
let message = channel
.new_message(&mut data.pool.get().await?, uuid, text.to_string())
.await?;
channel
.new_message(&mut data.pool.get().await.unwrap(), uuid, text.to_string())
redis::cmd("PUBLISH")
.arg(&[channel_uuid.to_string(), serde_json::to_string(&message)?])
.exec_async(&mut conn)
.await?;
}