message-chat-update
This commit is contained in:
@@ -86,8 +86,13 @@ async fn connect_handler(
|
||||
pubsub.subscribe("reaction").await.unwrap();
|
||||
println!("'reaction' pubsub subscribed");
|
||||
|
||||
// chats by member_id
|
||||
pubsub.subscribe(format!("chat:{}", listener_id)).await.unwrap();
|
||||
println!("'chat:{}' pubsub subscribed", listener_id);
|
||||
|
||||
// messages by chat_id
|
||||
for chat_id in &chats {
|
||||
let channel_name = format!("chat:{}", chat_id);
|
||||
let channel_name = format!("message:{}", chat_id);
|
||||
pubsub.subscribe(&channel_name).await.unwrap();
|
||||
println!("'{}' subscribed", channel_name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user