Commit Graph

716 Commits (4a54c6219ad8d8b8ecc4ee3a5ed4ac2f8f7fbc62)

Author SHA1 Message Date
Aevann1 bcda8a9a5a LGB enable gumroad 2022-07-23 16:29:49 +02:00
Aevann1 6dd37ba757 fix previous commit 2022-07-23 15:03:59 +02:00
Aevann1 05837c5b08 fix previous commit 2022-07-23 15:03:30 +02:00
Aevann1 583767aa6f stop notif spam on WPD 2022-07-23 15:02:36 +02:00
Snakes 4723332e07
LGB: disable wordle. 2022-07-23 02:22:45 -04:00
Snakes ed40fd9d76
Amend 2ccb50504: HOLE_OST -> HOLE_COST. 2022-07-22 15:43:34 -04:00
Aevann1 15073496c6 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-07-22 03:18:23 +02:00
Aevann1 2ccb505045 fix sneks accidentially adding pronouns and houses to deux 2022-07-22 03:18:20 +02:00
Snakes eb55a6cc01
LGB: disable country club. 2022-07-19 21:50:08 -04:00
Snakes b4fdf248ef LGB: disable profile bio, banner, song. 2022-07-19 21:20:52 -04:00
Snakes d06ea7d349 LGB: disable markup commands. 2022-07-19 21:20:52 -04:00
Snakes 3225a2a3d4
LGB: disable awards, badges. 2022-07-19 19:59:39 -04:00
Snakes be983504b7
LGB: disable gambling. 2022-07-18 03:47:17 -04:00
Snakes eef6c25b0b
LGB: Permission block, follow, voters visibility. 2022-07-18 03:17:45 -04:00
Snakes 0c43deeee6
FEATURES: pronouns, kys, chat, house, /vote perm. 2022-07-18 02:43:20 -04:00
Snakes 8f7d05d62d
Refactor feature flags to dict.
In anticipation of adding about a dozen more features flags to support
work for LGB, PIN_ENABLED and PROCOINS_ENABLED have been moved to the
FEATURES dict in const.py. More generally looking to create a unified
interface for logically-related constants, perhaps to support e.g.
later moving these settings from hardcoded constants to data.
2022-07-18 01:10:01 -04:00
Snakes c4e8755a8d
LGB: const settings, welcome message. 2022-07-17 23:59:20 -04:00
Aevann1 8af9b8a339 wipe cringetopia 2022-07-18 04:46:03 +02:00
Aevann1 4058e2adce revert what I did with the slur regex 2022-07-17 21:17:46 +02:00
Aevann1 1998536e4e fix previous commit 2022-07-17 19:19:48 +02:00
Aevann1 565b5c842a fix fag slur filter 2022-07-17 19:18:52 +02:00
Aevann1 5703425418 improve slur regex 2022-07-17 07:24:53 +02:00
Aevann1 0b77e3f039 sneed 2022-07-16 20:37:07 +02:00
Snakes a98f5e5706 PCM: raise pin limit to 10 for Kippy. 2022-07-14 21:21:20 -04:00
Snakes a217f76bad Deux: sidebar, sidebar thread; restrict holes. 2022-07-14 02:19:59 -04:00
Snakes 88108594ad Implement Deux login with rDrama challenge. 2022-07-13 20:36:04 -04:00
Aevann1 a7c5ad6045 change carp's id on lgbdropthet from 17 to 18 2022-07-13 23:37:15 +02:00
Aevann1 86717e37b2 refactor changelog 2022-07-13 23:03:11 +02:00
Aevann1 b2de11cb1a add "pins" toggle to the frontpage 2022-07-13 19:31:35 +02:00
Aevann1 aa4ab5b217 sneed 2022-07-13 17:16:53 +02:00
Aevann1 f7c2befeed allow deux jannies to add badges 2022-07-13 14:56:30 +02:00
Aevann1 f585597401 make deuxrama use rdrama's snappy quotes 2022-07-13 14:55:28 +02:00
Aevann1 3a97dac234 fix PCM reddit notifs 2022-07-12 21:26:07 +02:00
Aevann1 2a95c25675 allow @bbbb to vote 2022-07-12 21:23:37 +02:00
Aevann1 7a80ceef59 fix PCM reddit mentions 2022-07-12 02:47:46 +02:00
Aevann1 802952a555 relax slur filter on non-rdrama sites 2022-07-11 22:18:22 +02:00
Aevann1 70ea10eaf6 rename chudrama to deuxrama 2022-07-11 14:25:27 +02:00
Aevann1 b5d9db86d1 refactor comment commands 2022-07-11 14:14:18 +02:00
Aevann1 bd323d2bb9 add 2 more trusted domains 2022-07-11 13:55:19 +02:00
Aevann1 e3ca369392 fix the id of the first user 2022-07-11 12:19:43 +02:00
Aevann1 a9e355c804 sneed 2022-07-11 11:52:59 +02:00
Aevann1 9c3976a622 make new users follow carp automatically v2 2022-07-10 18:23:32 +02:00
Aevann1 2ddbcaa254 change agendaposter phrase for chudrama 2022-07-10 16:37:05 +02:00
Aevann1 bb59cd0476 minor logic tweaks 2022-07-10 16:21:16 +02:00
Aevann1 9ea0f46250 tweaking offsite mentions a little 2022-07-10 15:02:24 +02:00
Aevann1 74a39109e9 fix WPD bugs 2022-07-10 14:05:12 +02:00
Aevann1 59844e8232 fix chudrama bugs 2022-07-10 13:57:18 +02:00
Snakes 095b0229a2 LGB: Rename holes; make hole sidebar Drama-like. 2022-07-09 08:01:44 -04:00
Snakes b47e9c7e18 Fix bot ID constants for CT, WPD, LGB.
seed-db.sql in a8fe49f232 was changed to no longer have a System
user to support the notifications rework. The default IDs in const.py
were updated to reflect this. However, CT/WPD/LGB had user IDs from
the pre-rework SQL yet were using default IDs. The constants were
updated to reflect the state on prod.

Strangely, LGB has no user id #2. I have no idea why, but the
constants accurately reflect this fact.
2022-07-09 07:11:05 -04:00
Snakes 16125b419b LGB: Disable Snappy Marseys; Snappy empty behavior. 2022-07-09 07:11:05 -04:00
Snakes fde2d5ca11 LGB: Use static default pfp. 2022-07-09 07:11:05 -04:00
Snakes 02e096e5af LGB: add custom emoji list. 2022-07-09 00:32:48 -04:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 b617321529 move all env-getting to .const 2022-07-08 18:21:13 +02:00
Snakes 894011335b PCM: hole price- Kippy indecisive. 2022-07-07 23:43:48 -04:00
Snakes c7467419b9 PCM: change hole cost. 2022-07-07 23:37:37 -04:00
Snakes 6ad935e12a Permission flags UI visibility; start PERMS dict.
Original work started for WPD and LGB, who wish to restrict flags
visibility in the UI based on admin_level. To support this change and
upcoming changes, `const.PERMS: string -> int` was created.
Potentially targetting a future design where Permissions is a proper
business object integrated with the User model; however, for now just
looking toward getting admin_level magic numbers centralized.

This commit applies PERMS to: create_hole, flags visibility in UI,
flag removal in UI & backend. Flag visibility in Comment & Submission
json_raw methods is unaffected to avoid needing a user object to
build the JSON.
2022-07-06 23:45:33 -04:00
Aevann1 faa4f993f2 increase the price of progressivestack from 1000 to 1500 2022-07-04 04:06:28 +02:00
Aevann1 587b864e0a re-enable pins 2022-07-03 04:00:29 +02:00
Aevann1 bce4c13043 kitchen sink commit, all over the place 2022-07-02 12:44:05 +02:00
Aevann1 d0d15c319a Poll rework (#312)
* poll rework

* forgot to do joinedload on comments

* Fix logic errors with voting, SQL syntax.

Kitchen sink commit from review of poll-rework changes:
  1. Fix seed-db.sql syntax error.
  2. Fix SQL patch file duplication of *submissions* tables rather
     than one set of submissions and one for comments.
  3. Start makeshift SQL patch folder, since this is a large change
     that contributors may wish to apply to their local instances.
  4. Fix checkbox (non-`exclusive`) polls being unable to be
     unchecked. For consistency with `exclusive` polls, they should.
  5. Fix changing the option of an `exclusive` poll when both
     exclusive and non-exclusive options are present in one comment/
     post causing the non-exclusive options to become unchecked.
     (which, by my reading of SQLAlchemy `Query.one_or_none()`
     really could break quite badly in some cases).

* link relationships with their counterparts

* small modification to poll unchecking

Co-authored-by: TLSM <duolsm@outlook.com>
2022-07-02 08:48:04 +02:00
Snakes 1b9237ceaf Add assetcache.asset_siteimg, has_logo.
Commit began by changing the duplicated SITE_NAME conditional in the
header to use a `has_logo` param, much like the recent `has_sidebar`.
From there, a need to include site-specific assets in assetcache was
revealed, adding the `asset_siteimg(...)` macro. This was applied
quite broadly, though not comprehensively.
2022-07-01 01:55:53 -04:00
Snakes 39c945f7ca LGB: Initial sidebar & const. 2022-07-01 01:08:15 -04:00
Snakes 08c2ec7223 Make pin disabling site-specific. 2022-06-28 02:27:25 -04:00
Aevann1 42a6b5731a sneed 2022-06-28 08:17:21 +02:00
Snakes 1d500917ad Improve header currency display style. 2022-06-27 00:09:32 -04:00
Snakes e0c3c79902 WPD: Require flairs on all posts. 2022-06-26 03:42:56 -04:00
Snakes 268c23e2f8 WPD: make holes more flair-like in UI. 2022-06-26 03:42:15 -04:00
Snakes cd556b6d8e Refactor UI name of hole/sub to constant. 2022-06-26 03:41:28 -04:00
Aevann1 c1d227e2b6 exclude poll bots from "simps for" lists 2022-06-25 22:24:47 +02:00
Aevann1 f34c4e1196 stop using app.config for our own stuff 2022-06-24 17:08:57 +02:00
Aevann1 9593dc58dd move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00
Snakes ce79b1d84b PCM: lottery duration back to 1wk. 2022-06-23 22:40:51 -04:00
Aevann1 6463cbd1f4 "kike" slur filter modification 2022-06-24 00:33:39 +02:00
Aevann1 cff28b2070 add i.reddit.com to reddit_domain_regex 2022-06-23 22:00:49 +02:00
Aevann1 2c1d1aceff fix this https://chapotraphouse.club/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2178607?context=8#context 2022-06-23 21:43:49 +02:00
Aevann1 810e80c010 fix issue with snappy url archival 2022-06-23 21:41:23 +02:00
Aevann1 39cf7fc48b refactor normalizing urls at runtime (I put the function in comment.py cuz there were weird import errors that i didnt wanna fix) 2022-06-23 17:47:57 +02:00
gooseman 6fec7d51d9 make me notified (#308) 2022-06-22 21:37:27 -04:00
Aevann1 0e1177843e remove the need for alert flag on sanitize() 2022-06-23 00:12:47 +02:00
Aevann1 ebdda8c412 add poll_thread (fix) 2022-06-22 20:01:22 +02:00
Aevann1 414eb12410 add poll_thread 2022-06-22 20:01:00 +02:00
Snakes e2cd25db67 WPD: limit hole creation to JL2+. 2022-06-21 01:20:21 -04:00
Snakes f6b6997f61 Persist activity timestamp to users. 2022-06-20 16:25:03 -04:00
Aevann1 ef3fbbf520 adjusting greentext regex 2022-06-19 22:22:36 +02:00
Aevann1 f77a7b7cfc fixed double quoting and triple quoting, etc 2022-06-19 20:21:25 +02:00
Aevann1 3eb788103c allow only ascii characters in links (https://rdrama.net/comment/2150032) 2022-06-19 19:25:55 +02:00
Aevann1 5ddde69ac9 greentext fix 2022-06-19 17:22:06 +02:00
Aevann1 45b1b61760 added greentext 2022-06-19 17:05:50 +02:00
Aevann1 56f8cf793e give visible bots a body column (so their comments are searchable)
+ don't sanitize zoz/longpostbot/aj comments
2022-06-18 17:37:01 +02:00
Aevann1 0fb48bc380 make reddit_notifs_jl_min default to be 1 2022-06-16 16:15:24 +02:00
Aevann1 cab92d3c24 add marsey.cat to safe list 2022-06-16 14:36:43 +02:00
Snakes 46520a9f8c Site-specific: change lotto for PCM. 2022-06-15 22:23:21 -04:00
Aevann1 cdcef7d01d Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-15 15:32:55 +02:00
Aevann1 ff9c7c17fb readjust prophet muhammed (ï·º) slur filter 2022-06-15 15:32:52 +02:00
Snakes dfe0c64d99 Deduplicate site-specific constants, add SNAKES_ID. 2022-06-14 23:39:37 -04:00
Snakes 3301e238d6 Content: alphabet emoji, christian list. 2022-06-14 14:37:45 -04:00
Aevann1 0f49c8e32f replace spaces with tabs 2022-06-13 20:33:25 +02:00
Aevann1 f4aa70cc74 Revert "Add user title coin cost parameter."
This reverts commit dece3fd460.
2022-06-13 20:10:53 +02:00
Snakes f76b94b58d Content: keywords updates. 2022-06-11 22:08:48 -04:00
Aevann1 831344b723 small image embed improvements 2022-06-11 14:21:59 +02:00
Aevann1 1f42d228c1 remove 'apnic' from word list 2022-06-11 11:27:55 +02:00
Aevann1 654ddc4157 re-refactor normalize_url 2022-06-10 22:02:15 +02:00
Aevann1 36a1797276 escape / in imgur_regex 2022-06-10 21:04:25 +02:00
Aevann1 4910681c6f make the default HOLE_COST 0 (for testing purposes) 2022-06-10 20:14:24 +02:00
Aevann1 6a18c31ced exclude localhost from reddit notifs 2022-06-10 17:30:30 +02:00
Aevann1 774e079942 extend reddit notifs to ALL SITES 2022-06-10 17:25:03 +02:00
Aevann1 5db4bd1023 made CARP_ID to be 0 on new sites 2022-06-10 16:44:05 +02:00
Aevann1 3e365484fd refactor lottery a little bit + expand it to all of marsey's empire 2022-06-10 15:30:25 +02:00
Snakes 4db48a6ec9 Separate modaction notifs from inbox. 2022-06-10 08:28:46 -04:00
Snakes 8709ca816d Add Y'all Seein' Eye award v2 for offsitementions.
Reusing the assets and design for the ill-fated YSE in a0f441a67d.
This time, the award provides access to our offsite mentions (reddit
notifs).
2022-06-10 07:12:19 -04:00
Snakes bea6d82b61 Lottery: fix granted value, zero royalty.
grant_lottery_tickets_to_user incorrectly deposited the full ticket
value into manager account, not just the net value.

Additionally, royalty rate has been set to zero because Chapose won
the first lottery and grifting 8% that could instead go into the
prize pool seems unwarranted given that.
2022-06-10 06:15:37 -04:00
Snakes 5f7b38b477 Refactor stat timers, award timers.
Prior to this comment, the every-1d cron.py command was broken due
to lack of proper stats import. However, while refactoring this, it
was convenient to move other recurring tasks that had been stuffed in
odd places--not least `stats(...)`--into the new cron system. This
entailed a number of refactorings of other things.

1. Move stats(...) from static.py to helpers/stats.py.
2. Move hole inactivity purge task from stats(...) to routes/subs.py.
3. Move bot award timer checks from stats(...) to helpers/awards.py.
4. Unify award timer logic formerly in routes/front.py into the new
   helpers/awards.py.
2022-06-10 05:47:41 -04:00
Snakes dc7f13304e Add following holes for notifications. 2022-06-09 16:24:24 -04:00
Snakes ed240735fb Improve slur replacer performance, part deux.
h/t @official-techsupport again for finding another optimization.
We are now cumulatively at about 70% speedup over original.
It remains one of the hottest paths of the codebase in relative
terms, but its absolute performance demands have decreased enough
to buy us potentially substantial time on it.
2022-06-07 21:56:14 -04:00
Snakes da82ea81d8 Improve slur replacer performance.
h/t @official-techsupport for digging into the regex performance and
coming up with one that greatly reduces backtracking. We see an
approximately 2x speedup under typical loads, which proves to be a
major overall savings in performance. Previously, censor_slurs was,
second to ORM DB accesses, by far the most time-consuming function
in the codebase under typical loads. It's still not ideal, but it is
much better.

Future options to improve this critical path further would be:
  1) Precompute a slur-replaced HTML, rather than recomputing
     each pageload. Storage is cheap.
  2) Tokenize the HTML and replace plaintext words using O(1)
     exact-match lookups to a dict.
2022-06-07 21:16:58 -04:00
Snakes 995375decc Refactor reddit mentions, move to cron.
The reddit mentions system contained much duplicated code and was
grafted onto the post thumbnail pipeline to achieve semi-regular
invocation. Instead, we now run it through the new cron system,
and the duplicate code has been refactored out.
2022-06-07 10:42:24 -04:00
Snakes dece3fd460 Add user title coin cost parameter. 2022-06-06 19:02:23 -04:00
Snakes 843ff51ace Make post rate limit site-specific. 2022-06-02 22:10:59 -04:00
Snakes 379ae664a3 Make PIN_LIMIT a per-site constant. 2022-06-02 19:45:33 -04:00
Snakes 6b9a133204 Kitchen sink commit, misc. content updates.
- Increment cache version on popover badges.
- Add comments+submission_listing.js to assetcache to support ^.
- Append new words to wordle list.
- Cache bust assorted assets for recent PRs.
2022-06-02 19:32:13 -04:00
outruncolors dfd521b652 Add quantity field to purchasing tickets / Make Chapose the beneficiary (#302)
* Add quantity field to purchasing tickets

* Remove height requirement for div (manlets  seething)
2022-06-02 19:19:49 -04:00
float-trip 58c4b62163 Some fixes (#300)
* Narrow emoji_regex

* Fix mirrored pat emojis

* Fix ban icon on posts/comments
2022-06-02 19:18:10 -04:00
Outrun Colors, LLC ef7da60432 Remove new schema changes from file and replace account ids for lottery system 2022-05-29 22:17:31 -05:00
Outrun Colors, LLC b9dc28e6d1 Don't show lotteries on the sister sites 2022-05-29 20:43:16 -05:00
Outrun Colors, LLC a0cc7e1cf6 Move more stuff to proper location 2022-05-29 19:49:14 -05:00
Aevann1 709c756660 fds 2022-05-28 16:55:22 +02:00
Aevann1 cd2380fb33 fds 2022-05-28 04:20:31 +02:00
Aevann1 384afb125a fsd 2022-05-27 17:28:30 +02:00
Snakes 2bde3650d4 Awards: enable lootbox on WPD, refactor AWARDS2 logic. 2022-05-26 22:12:53 -04:00
Aevann1 f72015382a crgd is a king 2022-05-26 22:04:39 +02:00
Aevann1 64c3b489e3 fds 2022-05-26 20:37:10 +02:00
Aevann1 2595706b49 fsd 2022-05-26 20:36:37 +02:00
Aevann1 163267c88c Revert "Add Y'all Seein' Eye award."
This reverts commit a0f441a67d.
2022-05-26 02:51:42 +02:00
Snakes a0f441a67d Add Y'all Seein' Eye award.
Adds award to enable viewing profile visitors for non-mops and
non-patrons. This commit should encompass all frontend, backend, and
database changes necessary. Perhaps usable as a model for other
user upgrade flag awards.
2022-05-25 19:44:34 -04:00
Aevann1 c213451722 fdsfdsxc 2022-05-25 20:44:43 +02:00
Aevann1 386db76c10 crgd is a king 2022-05-25 20:29:22 +02:00
Aevann1 826f137a5e fsd 2022-05-25 02:22:09 +02:00
Snakes 8c3b6cece1 Add 8-ball answers, like fortune & factcheck. 2022-05-24 19:08:41 -04:00
Aevann1 6631777f76 fds 2022-05-24 22:45:34 +02:00
Aevann1 bbd851210e fds 2022-05-24 17:32:49 +02:00
Aevann1 dcf1c794cc fds 2022-05-24 04:48:50 +02:00
Aevann1 c5413e9e53 sdf 2022-05-23 17:28:23 +02:00
Snakes cc75375c82 Un-deploy Birthgay event.
Removes temporary changes for the Birthgay 2022 event, ending
approximately at 2022-05-23 0600Z. Changes:
 - Double XP disabled.
 - Lootboxes disabled.
 - Three event awards given real descriptions and colors.
 - Partyhats: restored to cakeday-only condition and tooltip.
 - Header UI: balloons removed, text visibility outline removed,
   journoid banner reverted, marseyjam as header icon.
 - Birthgay banners: removed from template, moved to new storage dir.

Confetti, though remaining as a permanent award, has been temporarily
removed pending a less performance-intensive implementation and one
that doesn't require maintaining a third-party package in the codebase.
2022-05-23 01:48:25 -04:00
Aevann1 0a74a98ec5 big ass commit 2022-05-23 00:15:29 +02:00
Snakes 9a23c195ed Fix overpermissive email regex. 2022-05-20 18:49:00 -04:00
Aevann1 2737a6ca47 sfd 2022-05-20 23:41:08 +02:00
Aevann1 4a6545ef5d dfsfds 2022-05-20 16:39:46 +02:00
Aevann1 eead5570e5 fsd 2022-05-20 16:17:09 +02:00
Snakes c789f6923e Merge remote-tracking branch 'upstream/frost' into birthgay-staging 2022-05-19 17:59:35 -04:00