mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
For promoted links, skip first insertion only 50% of the time
This commit is contained in:
@@ -80,7 +80,7 @@ def insert_promoted(link_names, sr_ids, logged_in):
|
||||
# logged in users, and 50% of the time for logged-off users when
|
||||
# the pool of promoted links is less than 3 (to avoid showing the
|
||||
# same promoted link to the same person too often)
|
||||
if logged_in or len(promoted_items) < 3:
|
||||
if (logged_in or len(promoted_items) < 3) and random.choice((True,False)):
|
||||
promoted_items.insert(0, None)
|
||||
|
||||
# insert one promoted item for every N items
|
||||
|
||||
Reference in New Issue
Block a user