let data = wsJsonToRes<CommentResponse>(msg).data;
// Necessary since it might be a user reply
- if (data.recipient_ids.length == 0) {
+ if (data.form_id) {
this.state.comments.unshift(data.comment_view);
this.setState(this.state);
}
let data = wsJsonToRes<CommentResponse>(msg).data;
// Necessary since it might be a user reply
- if (data.recipient_ids.length == 0) {
+ if (data.form_id) {
// If you're on subscribed, only push it if you're subscribed.
if (this.state.listingType == ListingType.Subscribed) {
if (
} else if (op == UserOperation.CreateComment) {
let data = wsJsonToRes<CommentResponse>(msg).data;
- // Necessary since it might be a user reply
- if (data.recipient_ids.length == 0) {
+ // Necessary since it might be a user reply, which has the form_id removed
+ if (data.form_id) {
this.state.postRes.comments.unshift(data.comment_view);
this.setState(this.state);
}