]> Untitled Git - lemmy.git/blobdiff - crates/websocket/src/send.rs
Fixing some comment websocket issues. (#1768)
[lemmy.git] / crates / websocket / src / send.rs
index 130d94a48eefcd00e162596e189874cd180f0b54..a49759d639c2feda27ce2c31dc1df51daf77d9b5 100644 (file)
@@ -76,10 +76,11 @@ pub async fn send_comment_ws_message<OP: ToString + Send + OperationType + 'stat
     view.comment = view.comment.blank_out_deleted_or_removed_info();
   }
 
-  let res = CommentResponse {
+  let mut res = CommentResponse {
     comment_view: view,
     recipient_ids,
-    form_id,
+    // The sent out form id should be null
+    form_id: None,
   };
 
   context.chat_server().do_send(SendComment {
@@ -88,6 +89,10 @@ pub async fn send_comment_ws_message<OP: ToString + Send + OperationType + 'stat
     websocket_id,
   });
 
+  // The recipient_ids should be empty for returns
+  res.recipient_ids = Vec::new();
+  res.form_id = form_id;
+
   Ok(res)
 }