From 9c57e6b33e512720369b0077c4d17de124763001 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Jan 2021 12:06:56 -0500 Subject: [PATCH] Fixing comment issue. --- src/shared/components/post.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/components/post.tsx b/src/shared/components/post.tsx index 313e3c0..73d861e 100644 --- a/src/shared/components/post.tsx +++ b/src/shared/components/post.tsx @@ -444,6 +444,7 @@ export class Post extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), 'danger'); return; @@ -479,8 +480,8 @@ export class Post extends Component { } else if (op == UserOperation.CreateComment) { let data = wsJsonToRes(msg).data; - // Necessary since it might be a user reply, which has the form_id removed - if (data.form_id) { + // Necessary since it might be a user reply, which has the recipients, to avoid double + if (data.recipient_ids.length == 0) { this.state.postRes.comments.unshift(data.comment_view); this.setState(this.state); } -- 2.44.1