mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-14 17:38:04 -05:00
Sharing: Force links to include the feature flag in the cache key.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
# Inc. All Rights Reserved.
|
||||
###############################################################################
|
||||
|
||||
from r2.config import feature
|
||||
from r2.lib.db.thing import (
|
||||
Thing, Relation, NotFound, MultiRelation, CreationError)
|
||||
from r2.lib.db.operators import desc
|
||||
@@ -496,6 +497,8 @@ class Link(Thing, Printable):
|
||||
item.nsfw_str)
|
||||
item.nsfw = item.over_18 and user.pref_label_nsfw
|
||||
|
||||
item.show_new_post_sharing = feature.is_enabled('improved_sharing')
|
||||
|
||||
item.is_author = (user == item.author)
|
||||
|
||||
item.thumbnail_sprited = False
|
||||
|
||||
Reference in New Issue
Block a user