Update normalized_hot to allow certain LabeledMultis
to specify slightly different weighting between subreddits
compared to the current algorithm.
Current merge algorithm always results in an N-subreddit multi
having the first N results being the #1 result from each of
the individual subreddits; this is not always ideal for slow
subreddits (e.g., /r/announcements and /r/blog).
Age-weighting allows a LabeledMulti to scale those older posts
further down the list, and lets them drop off after a number of
days.
The age-weighting will require a change to the use of sgm
in normalized_hot prior to full deployment, as the calculated
ehot values are no longer global amongst all users.
Note: While I'd have preferred to do a "nice" endpoint
like what I did with user friends, there's been enough
delay in exposing /api/friend functionality to OAuth2
consumers that I decided it would be best to take the
less clean solution.
This fixes bold `False`s showing up in the `.json-html`
and `.json-compact` renderstyles. Apparently been an issue for
5 years, but it was only noticed now.
The logic of this code contained a couple subtle errors that could cause
strange behavior. In reddit's current state of having two "automatic
subreddits" (which are always included in the front page set, and not
counted towards the limit), the fact that the automatic_ids list could
have an item removed while being iterated over meant that unsubscribing
from the first automatic subreddit (/r/blog) made it so that it was
effectively impossible to unsubscribe from the second one
(/r/announcements). If you unsubscribed, it would still be present in
your front page regardless, and if you stayed subscribed it would
actually be present twice.
This reverts commit 605fa72772fa84b9245498f817cdc6d872ab3bdd.
This endpoint has had no significant traffic for months, and should be
safe to remove again at this point.
While we can always hard-code checks for gold, putting this into the feature
flag system allows us to move things from gold-only to everyone with only a
config change.
This allows the option for non-anonymous gildings or to write a message.
Whether the user purchased anonymously or non-anonymously for gildings will
be remembered and applied to future gildings (initializes to False so it's
still anonymous until the user decides to change it).
If specific user accounts were allowed to use a feature, logged-out
users would cause the feature flag check to fail because
UnloggedUser.name exists but raises NotImplementedError. This makes the
feature-world return None for user if no user is logged in.
We got a message from Google Webmaster Tools letting us know they'd like to
pretend to be a mobile device and crawl our mobile pages, but can't, because we
disallow it in our `robots.txt` rules. We have canonicalization set up to
point towards desktop pages, so we shouldn't be hurt by allowing this.
We should also at some point provide two-way annotations to let them go from
desktop -> mobile[0], but for now this should suffice.
[0]: https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls