Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple years ago, reddit added support for marking posts/links as "spoiler", obsoleting the hack that I guess some subs were using. No longer does the NSFW (
over_18
) flag need to do double duty!This frees the Sopel project from having to maintain a list of spoiler-enabled subreddits (which was apparently never updated, anyway).
Channels can also be marked as "spoiler-free" now, separately from their "sfw" status. You can have a safe-for-work channel that still allows spoilers, or a spoiler-free channel that still allows lewds. Freedom!
This is a draft for now, because it's based on #1505's branch. Once that's merged, I'll promote this to "ready for review". Feel free to bikeshed in the meantime—especially command name.
Additional code cleanup could stand to happen—this plugin doesn't really make use of all the decorators that it should (such as checking for OP). I'll do a minor refactor after #1539 is merged, to modernize as much as possible all at once.