Commit Graph

537 Commits (0c5ddeb1f7ad2c798bdb513fbaa1ab6b053c7ee2)

Author SHA1 Message Date
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