mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Ensure comments get queued for processing even if rendering fails.
This is a hacky fix for comments failing to render causing incorrect comment counts.
This commit is contained in:
committed by
Keith Mitchell
parent
86265bfe48
commit
fd61e80f5b
@@ -1454,6 +1454,17 @@ class ApiController(RedditController):
|
||||
# newcomments_q, so if they refresh immediately they
|
||||
# won't see their comment
|
||||
|
||||
#update the queries
|
||||
if is_message:
|
||||
queries.new_message(item, inbox_rel)
|
||||
else:
|
||||
queries.new_comment(item, inbox_rel)
|
||||
|
||||
#set the ratelimiter
|
||||
if should_ratelimit:
|
||||
VRatelimit.ratelimit(rate_user=True, rate_ip = True,
|
||||
prefix = "rate_comment_")
|
||||
|
||||
# clean up the submission form and remove it from the DOM (if reply)
|
||||
t = commentform.find("textarea")
|
||||
t.attr('rows', 3).html("").val("")
|
||||
@@ -1468,17 +1479,6 @@ class ApiController(RedditController):
|
||||
# remove any null listings that may be present
|
||||
jquery("#noresults").hide()
|
||||
|
||||
#update the queries
|
||||
if is_message:
|
||||
queries.new_message(item, inbox_rel)
|
||||
else:
|
||||
queries.new_comment(item, inbox_rel)
|
||||
|
||||
#set the ratelimiter
|
||||
if should_ratelimit:
|
||||
VRatelimit.ratelimit(rate_user=True, rate_ip = True,
|
||||
prefix = "rate_comment_")
|
||||
|
||||
@validatedForm(VUser(),
|
||||
VModhash(),
|
||||
VCaptcha(),
|
||||
|
||||
Reference in New Issue
Block a user