forked from gorb/backend
fix: return message struct to websocket connection
This commit is contained in:
parent
efa0cd555f
commit
bcb82d0f46
1 changed files with 5 additions and 5 deletions
|
@ -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?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue