This commit is contained in:
Tony Rewin 2023-10-02 19:18:23 +03:00
parent e0f8f0f0e0
commit 67c7f8ecc3

View File

@ -72,9 +72,14 @@ async fn create_first_chat(author_id: i32) -> Vec<String> {
let _: () = redis::pipe()
.atomic()
.sadd_multiple(format!("chats_by_author/{}", author_id), &members)
.cmd("SADD")
.arg(format!("chats_by_author/{}", author_id))
.arg(&chat_id)
.ignore()
.set(format!("chats/{}", chat_id), chat.to_string())
.ignore()
.set(format!("chats/{}/next_message_id", chat_id), "0")
.ignore()
.query_async(&mut con)
.await
.unwrap();