Skip to content

Commit

Permalink
fix(replies-count): Fixed the bug of -1 replies showing on the fronte…
Browse files Browse the repository at this point in the history
…nd of a thread that was just created by increasing numReplies by 1 from proxy queries
  • Loading branch information
crod951 committed Nov 29, 2024
1 parent bf28bb0 commit b35ff33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/epochtalk_server_web/helpers/proxy_conversion.ex
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ defmodule EpochtalkServerWeb.Helpers.ProxyConversion do
),
last_thread_created_at: t.id_member_started,
last_thread_id: t.id_topic,
last_thread_post_count: t.numReplies,
last_thread_post_count: t.numReplies + 1,
last_thread_slug: t.id_topic,
last_thread_title: m.subject,
last_thread_updated_at: m.posterTime * 1000
Expand Down Expand Up @@ -382,7 +382,7 @@ defmodule EpochtalkServerWeb.Helpers.ProxyConversion do
started_user_id: t.id_member_started,
last_post_user_id: t.id_member_updated,
moderated: t.selfModerated,
post_count: t.numReplies,
post_count: t.numReplies + 1,
title: f.subject,
user_id: f.id_member,
username: f.posterName,
Expand Down Expand Up @@ -428,7 +428,7 @@ defmodule EpochtalkServerWeb.Helpers.ProxyConversion do
started_user_id: t.id_member_started,
updated_user_id: t.id_member_updated,
moderated: t.selfModerated,
post_count: t.numReplies,
post_count: t.numReplies + 1,
title: f.subject,
user_id: f.id_member,
username: f.posterName,
Expand Down Expand Up @@ -584,7 +584,7 @@ defmodule EpochtalkServerWeb.Helpers.ProxyConversion do
locked: t.locked,
user: %{id: t.id_member_started, deleted: false},
moderated: t.selfModerated,
post_count: t.numReplies,
post_count: t.numReplies + 1,
thread_title: f.subject,
body: f.body,
created_at: f.posterTime * 1000,
Expand Down

0 comments on commit b35ff33

Please sign in to comment.