Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Don't filter NSFW reddits for API clients #526

Closed
wants to merge 3 commits into from
Closed

Don't filter NSFW reddits for API clients #526

wants to merge 3 commits into from

Conversation

Deimos
Copy link
Contributor

@Deimos Deimos commented Sep 12, 2012

No description provided.

@bboe
Copy link
Contributor

bboe commented Oct 1, 2012

How does this pull request interact with #479?

@Deimos
Copy link
Contributor Author

Deimos commented Oct 1, 2012

I don't think there should be any crossover, this is specifically for the subreddit-listing page (/reddits), whereas #479 seems to be related to listings of actual submissions inside subreddits.

if not c.over18:
# Always show NSFW to API users unless obey_over18=true in querystring
is_api_client = c.render_style in extensions.API_TYPES
if (not is_api_client and not c.over18) or (is_api_client and c.obey_over18):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In its current form, this appears to always filter out over18 if c.obey_over18 even if c.over18. Instead, it should probably read:

    if not c.over18 and (not is_api_client or c.obey_over18):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess it should actually test the thing that it's supposed to be obeying. Yours looks correct, I'll update it.

@spladug
Copy link
Contributor

spladug commented Nov 20, 2012

Due to fixing the bad query, this will no longer work as-is. I'm going to close this pull request. If you'd like to implement this functionality (which sounds good to me) in the keep_fn I'll gladly take a new request. Thanks for all your work on this.

@spladug spladug closed this Nov 20, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants