mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Allow comments on old promoted links.
This commit is contained in:
committed by
Neil Williams
parent
9d97503ccb
commit
840cea6067
@@ -1037,7 +1037,7 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
or not sr.should_ratelimit(c.user, 'comment')):
|
||||
should_ratelimit = False
|
||||
parent_age = c.start_time - parent._date
|
||||
if parent_age.days > g.REPLY_AGE_LIMIT:
|
||||
if not link.promoted and parent_age.days > g.REPLY_AGE_LIMIT:
|
||||
c.errors.add(errors.TOO_OLD, field = "parent")
|
||||
|
||||
#remove the ratelimit error if the user's karma is high
|
||||
|
||||
@@ -306,7 +306,7 @@ class FrontController(RedditController, OAuth2ResourceController):
|
||||
display = False
|
||||
if not comment:
|
||||
age = c.start_time - article._date
|
||||
if age.days < g.REPLY_AGE_LIMIT:
|
||||
if article.promoted or age.days < g.REPLY_AGE_LIMIT:
|
||||
display = True
|
||||
displayPane.append(UserText(item = article, creating = True,
|
||||
post_form = 'comment',
|
||||
|
||||
@@ -799,7 +799,7 @@ class Comment(Thing, Printable):
|
||||
item.can_reply = False
|
||||
if c.can_reply or (item.sr_id in can_reply_srs):
|
||||
age = datetime.now(g.tz) - item._date
|
||||
if age.days < g.REPLY_AGE_LIMIT:
|
||||
if item.link.promoted or age.days < g.REPLY_AGE_LIMIT:
|
||||
item.can_reply = True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user