This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Comment Pane Cache: disable caching for the author of the link.

  • Loading branch information...
1 parent cb1d625 commit 3812f7ba8f45ba9705f3d0c3ec61731bfa9ff818 @spladug spladug committed Aug 28, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 r2/r2/lib/pages/pages.py
View
@@ -1049,6 +1049,11 @@ def __init__(self, article, sort, comment, context, num, **kw):
self.can_reply = False
if c.user_is_admin:
try_cache = False
+
+ # don't cache if the current user is the author of the link
+ if c.user_is_loggedin and c.user._id == article.author_id:
+ try_cache = False
+
if try_cache and c.user_is_loggedin:
sr = article.subreddit_slow
c.can_reply = self.can_reply = sr.can_comment(c.user)

0 comments on commit 3812f7b

Please sign in to comment.