Commit Graph

16010 Commits (05e8dec716d0e8bf9cc53fceda89cd3661d4d0dc)

Author SHA1 Message Date
Aevann1 c24851dbb3 only calculate users when we actually need them 2022-10-15 09:31:24 +02:00
Aevann1 c29b7e0871 remove chud rotating pfps 2022-10-15 08:57:28 +02:00
Aevann1 5b1e3b7aff Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-15 08:55:56 +02:00
Aevann1 b1efa072e6 rename /agendaposters to /chuds 2022-10-15 08:55:54 +02:00
Snakes 683d562058
Fix pruning of {SITE}_loggedin/out dicts.
For the past week, we noticed a gradual increase in CPU usage and
request times. Use of a sampling profiler revealed the time waas spent
in serializing/deserializing data stored in Redis. In particular, the
user counter dicts were filtered for calculation of the loggedin/out
counters, but the filtered versions were never stored.

To make concurrency safe, we still filter on every request, but at
least the resting data will eventually be appropriately filtered,
and this data is non-critical regardless.
2022-10-14 17:41:26 -04:00
Snakes b6703595da
Revert "make 819.webp the only sidebar image for a couple of days to hopefully piss off someone"
This reverts commit d244124d47.

It's been a few days, reverted upon Carp request.
2022-10-14 15:34:20 -04:00
justcool393 419ed61dd3 discord ids as constants 2022-10-14 11:46:39 -07:00
Aevann1 0753d73f32 fix wrong js func name 2022-10-14 20:43:01 +02:00
Aevann1 c49ae42205 fix for joan 2022-10-14 20:41:03 +02:00
Aevann1 f59263c42d Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-14 20:35:15 +02:00
Aevann1 afdec9a5a9 minor tweak to avoid double-notifying ppl 2022-10-14 20:35:13 +02:00
justcool393 85d2994cce pin_post -> pinPost 2022-10-14 11:34:31 -07:00
Aevann1 423ad25d2a fix typo 2022-10-14 20:28:46 +02:00
Aevann1 2411053d55 add tiered pins 2022-10-14 20:28:20 +02:00
justcool393 df1eedc8d9
button1 button2 2022-10-14 11:20:23 -07:00
justcool393 3b86227872 refactor asset submissions a bit 2022-10-14 11:03:47 -07:00
Aevann1 afd11e376f fix 500 error 2022-10-14 19:15:29 +02:00
Aevann1 f2a5c8f5d4 add whitelist of badge_granting on WPD, and disallow removing award badges 2022-10-14 19:11:39 +02:00
Aevann1 77312317f3 get rid of Boolean columns for permenant awards 2022-10-14 18:59:49 +02:00
Aevann1 f9840d5c71 sneed 2022-10-14 16:00:08 +00:00
justcool393 09027e51d7 reply to edit 2022-10-14 08:43:58 -07:00
Aevann1 661bf3af67 remove unnecessary margin in /transfers 2022-10-14 17:31:35 +02:00
Aevann1 4cbe5c41eb even higher margins 2022-10-14 17:31:02 +02:00
Aevann1 6a11de21e0 fix 500 error 2022-10-14 17:29:26 +02:00
Aevann1 efe0ff091a increase margins in log 2022-10-14 17:28:07 +02:00
justcool393 36b370dd14 use comment length for snappy, not post 2022-10-14 06:19:47 -07:00
justcool393 6efb9b41b4 use createXhrWithFormKey in the lottery 2022-10-14 06:07:47 -07:00
justcool393 bb9ab04a90 spaces -> tabs 2022-10-14 06:07:47 -07:00
justcool393 0eaed637be use createXhrWithFormKey in more places 2022-10-14 06:07:47 -07:00
justcool393 f22ef3a7e5 refactor post_toast_callback a bit and create createXhrWithFormKey function 2022-10-14 06:07:47 -07:00
justcool393 6884774906 showToast adjusments so we can use toast 2 and adjust them for ALMOST all of them 2022-10-14 06:07:47 -07:00
justcool393 c12f5ae43a use showToast in most places that we can 2022-10-14 06:07:47 -07:00
Aevann1 5e55ff7f90 make the modlog note for updating assets link to te updated asset 2022-10-14 14:38:06 +02:00
Aevann1 89a0ff4a4b remove username reservation system 2022-10-14 14:01:06 +02:00
Aevann1 6c2f2c5404 fix expanded images 2022-10-14 13:44:03 +02:00
justcool393 2dd74d3acd don't constantly check for reposts when it's obvious there can't be one
we currently spam the /is_repost api on every single character change in the URL box even though there is no way these URLs would ever be submitted to the site

introducing a frankly conservative limit to where we start actually pinging both the api and (on the backend) the database for reposts may help in some cases

the current constant was chosen by taking the length of "http://" and adding 2 to it
2022-10-14 03:27:45 -07:00
justcool393 e4cbe4178a tabify 2022-10-14 02:50:39 -07:00
justcool393 29af9dbbf4 move fn 2022-10-14 02:50:39 -07:00
justcool393 7620d8d8cd show the error toast on errors, not the success toast 2022-10-14 02:50:39 -07:00
justcool393 3a11cfd603 rename classname to className 2022-10-14 02:50:39 -07:00
justcool393 b06ee9ac9b refactor of post_toast 2022-10-14 02:50:39 -07:00
justcool393 2559794135 Move stuff we put in bootstrap.js to a new core.js file 2022-10-14 02:50:39 -07:00
Aevann1 caf5034608 same last commit 2022-10-13 21:43:48 +02:00
Aevann1 de6de0acae fix security policy in chat.html 2022-10-13 20:42:46 +02:00
Aevann1 3888b29983 potential solution to the chat docker problem 2022-10-13 20:21:02 +02:00
Aevann1 e0559301d5 restore horizontal margin for expanded images 2022-10-13 19:34:31 +02:00
Aevann1 948bd21f9b Revert "minor change in sorting_and_time"
This reverts commit 3a3cb0da4d.
2022-10-13 18:21:26 +02:00
Aevann1 6cf3ac2cc5 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-13 18:21:02 +02:00
Aevann1 3a3cb0da4d minor change in sorting_and_time 2022-10-13 18:21:00 +02:00
justcool393 e511fec4aa i don't know why this committed 2022-10-13 08:15:33 -07:00
justcool393 f7ca9aa248 fix the weird text scrolling bug (hopefully)
* this seemed like an odd floating point bug with scrollTo(), maybe? i think this should fix it
2022-10-13 08:11:47 -07:00
Aevann1 73bd39835b fix cursor on comment and post scores 2022-10-13 16:44:05 +02:00
Aevann1 a5eaeb809d fix 500 error 2022-10-13 16:26:35 +02:00
Aevann1 caccb2307d fix this https://rdrama.org/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2887592?context=8#context 2022-10-13 16:25:10 +02:00
Aevann1 6b0e6b49ee disallow discord links in DMs 2022-10-13 15:26:59 +02:00
Aevann1 9f24a8ddc5 remove annoyance 2022-10-13 14:02:31 +02:00
Aevann1 86d5da7de6 fix this https://rdrama.net/post/112582/chudded-award-now-destroys-hours-of 2022-10-13 13:55:29 +02:00
Aevann1 7a6b4406ef remove redundant shadoban filters 2022-10-13 12:47:55 +02:00
justcool393 fb150dab8e use constant instead of literal 5 2022-10-13 00:58:33 -07:00
justcool393 0f56b8de5e i need a d 🤭 2022-10-13 00:55:15 -07:00
justcool393 c56e45aa57 create cloudflare helper 2022-10-13 00:55:15 -07:00
Snakes e7da195645
Revert "Disable Cloudflare API call timing out admin_home."
This reverts commit ed27225d10.

The proximal cause of the request timeout issues was the /comments
performance issues, which seem to have been resolved by 2edeb4875.
Probably still need to refactor this, but for now it's likely fine.
2022-10-13 02:12:35 -04:00
Snakes 2edeb48751
Refactor /comments to use single query. 2022-10-13 01:52:54 -04:00
Snakes ed27225d10
Disable Cloudflare API call timing out admin_home. 2022-10-13 00:47:37 -04:00
Snakes e5af46c4ae
Fix shadow visibility logic. 2022-10-13 00:10:34 -04:00
Aevann1 cdff11424f use charge_account everywhere 2022-10-12 18:33:00 +02:00
justcool393 d04c170466 partially revert this for main 2022-10-12 09:01:43 -07:00
justcool393 ee85b5577a use error handlers in cases where we can 2022-10-12 08:55:42 -07:00
justcool393 fe9064a9b7
update get.py redux 2022-10-12 08:40:43 -07:00
justcool393 5c03e5a7a4
Update get.py 2022-10-12 08:33:49 -07:00
Aevann1 7316d8e827 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 15:23:49 +00:00
Aevann1 f765ac650a Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 17:23:22 +02:00
Aevann1 31a3b987d6 fix 500 error 2022-10-12 17:23:15 +02:00
Aevann1 944eab9985 sneed 2022-10-12 12:00:04 +00:00
justcool393 c67406b84b use site specific patron name 2022-10-12 03:45:45 -07:00
justcool393 7b3361cfb7 temporary (maybe) sidebar and banner processing fn
* also make existing badge return 409 instead of 403
2022-10-12 03:04:34 -07:00
justcool393 b92535c286 pings bypass permission 2022-10-12 02:36:29 -07:00
justcool393 db9b37de40 type hints for get functions :) 2022-10-12 02:22:13 -07:00
Aevann1 32bede574b Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 11:04:35 +02:00
Aevann1 5849def6c1 dont show vote creation times if they're under 1599343262 2022-10-12 11:04:26 +02:00
justcool393 96879894af remove 417 (use 409) and reword 418 msg 2022-10-12 02:00:18 -07:00
justcool393 5377472146 show correct max video size 2022-10-12 01:53:23 -07:00
justcool393 ca7fa50419 remove 414 and change 413 msgs
* use 413 for videos and put explanatory text there
* add style text for 413 as well
2022-10-12 01:52:08 -07:00
Snakes 3482f97bfb
Remove accidentally sneeded debug code.
We were experiencing errors on prod where is_repost would not have
either g or g.db available on request teardown, which would eventually
culminate in errors.py:error_500. These haven't reoccurred for nearly
16hrs now, and the test code got caught in a 'sneed' commit. Best to
have it gone.
2022-10-12 04:32:18 -04:00
justcool393 ad52c49782 put details EVERYWHERE
why are there 25 of these...
2022-10-12 01:25:32 -07:00
justcool393 eaf361ad91 API: set the status code on errors 2022-10-12 01:17:48 -07:00
Aevann1 db0fd8a0e9 sneed 2022-10-12 08:09:03 +00:00
Snakes 166e33dc38
Clarify architecture of sort_objects. 2022-10-12 04:05:26 -04:00
Aevann1 d18e247513 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 09:03:30 +02:00
Aevann1 2aa281e8c8 refactor sorting again (untested) 2022-10-12 09:03:28 +02:00
justcool393 bb1658e0a0 WPD: remove vestigial social and music filer code 2022-10-12 00:03:08 -07:00
Aevann1 925ec12141 more shadowban refactor 2022-10-12 08:53:32 +02:00
justcool393 941b5fa82d vote realness is in user model 2022-10-11 23:47:47 -07:00
Aevann1 81b2e04ff7 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 08:40:04 +02:00
justcool393 dcd875c40c max image and video size are constants now
* the error pages still need to be fixed
2022-10-11 23:27:17 -07:00
Aevann1 e1ee9a69e4 refactor seeing shadowbanned shit (untested) 2022-10-12 08:24:30 +02:00
Aevann1 318a20250c Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 08:10:15 +02:00
Aevann1 b1abd33835 refactor sorting 2022-10-12 08:10:11 +02:00
Snakes baf0386d8c
PCM: re-enable gambling. 2022-10-12 02:08:20 -04:00
Aevann1 07043873b9 WPD: banner sneed. 2022-10-12 05:57:58 +00:00
justcool393 7ee3c78b2e ree 2022-10-11 22:51:04 -07:00
Aevann1 ab6aaf5787 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 07:41:02 +02:00
Aevann1 87578283d2 show the time a hole was created on 2022-10-12 07:40:59 +02:00
justcool393 501fbbf5d3 move antispam code to actions 2022-10-11 22:34:55 -07:00
justcool393 5591d7d574 fix real votes 2022-10-11 22:27:27 -07:00
Aevann1 4ccbc5a6b5 upscale ripbozo emoji 2022-10-12 07:12:34 +02:00
Aevann1 04ecef4214 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 04:06:44 +00:00
Aevann1 46b310cdf3 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 06:06:18 +02:00
Aevann1 cdfbbd0217 fix wrong name for feature 2022-10-12 06:06:11 +02:00
Aevann1 9ef74dd642 sneed 2022-10-12 00:00:04 +00:00
justcool393 9044548630 forgot to actually execute the query 2022-10-11 12:05:00 -07:00
justcool393 65e4a179b0 remove vote code duplication 2022-10-11 12:05:00 -07:00
Aevann1 dac9fabccd dont disable the button in the shop (to make buying en masse either) 2022-10-11 20:22:14 +02:00
Aevann1 0cb2a56f5c fix last commit 2022-10-11 19:28:08 +02:00
Aevann1 a9dd6bf1e7 add a media check 2022-10-11 19:26:38 +02:00
Aevann1 b544171449 store the fullpath in the media table 2022-10-11 19:20:15 +02:00
Aevann1 96cdda57f7 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-11 19:13:53 +02:00
Aevann1 55eabc0871 give user an error in the UI if they try to submit more than 4 files 2022-10-11 19:13:50 +02:00
justcool393 71759e6afa 400 -> 409 2022-10-11 09:55:24 -07:00
Aevann1 ac8db50450 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-11 16:41:21 +00:00
Aevann1 466867afd1 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-11 18:41:12 +02:00
Aevann1 e3a3cbd358 add "hot" comment sorting 2022-10-11 18:41:09 +02:00
Aevann1 e003571368 sneed 2022-10-11 16:00:07 +00:00
justcool393 63215b8888 move messages to constant file and also remove special logic for PCM, instead opting to modify the constant instead 2022-10-11 08:40:19 -07:00
justcool393 3a5c90e6d3 change 409 msg 2022-10-11 08:40:19 -07:00
justcool393 eebef17e8d another dumb syntax error 2022-10-11 08:40:19 -07:00
justcool393 2004278791 syntax error fix 2022-10-11 08:40:19 -07:00
justcool393 39e49a508f add 409 to errors
* also move check for AUTOJANNY_ID to before has_blocked
2022-10-11 08:40:19 -07:00
justcool393 c0acb1722b abort a bunch of stuff where we manually returned JSON 2022-10-11 08:40:19 -07:00
justcool393 64cd11377e fix 500 werkzeug description, add note, and remove unused import 2022-10-11 08:40:19 -07:00
justcool393 665e6e4b21 handle 500 and 401 (when using API) with our handlers
* 401 had sign up and login buttons on their page, but the page was never visible, we only show this when the API is being used
2022-10-11 08:40:19 -07:00
justcool393 e364ce8043 add 417 and fix 414 2022-10-11 08:40:19 -07:00
justcool393 ec610e99c5 add details and tell jinja that variables have kept themselves safe 2022-10-11 08:40:19 -07:00
justcool393 ac011a77b9 remove unneeded templates, use custom handler for 500, and 401 is "Unauthorized," not "Not Authorized" 2022-10-11 08:40:19 -07:00
justcool393 fd25809cac rework errors 2022-10-11 08:40:19 -07:00
Aevann1 0ba14cb771 same as last commit 2022-10-11 16:44:43 +02:00
Aevann1 d9253ddd67 change default for "Controversial" value in user class 2022-10-11 16:43:50 +02:00
Aevann1 d244124d47 make 819.webp the only sidebar image for a couple of days to hopefully piss off someone 2022-10-11 15:54:11 +02:00
Aevann1 8032b9d5a4 allow me to ban (((🐟))) 2022-10-11 15:48:49 +02:00
Aevann1 490debb293 Merge branches 'frost' and 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-11 15:47:02 +02:00
Aevann1 06c858b6cf fix 500 error 2022-10-11 15:43:57 +02:00
justcool393 9ec3fb3b51 use proper get function 2022-10-11 06:37:40 -07:00
Aevann1 998b966f2b remove unnecessary shit in wrappers 2022-10-11 15:19:55 +02:00
Aevann1 523d1c9dab sneed 2022-10-11 09:57:46 +00:00
Snakes b9f4c9c58b
Add emoji: past 3mo of assorted non-Marseys. 2022-10-11 05:51:08 -04:00
Snakes 091f5b0399
Add emoji: asianjaks. 2022-10-11 05:16:45 -04:00
Snakes b0244a2a09
Add emoji: party parrots. 2022-10-11 05:13:04 -04:00
justcool393 01138ab592 bypass read only mode perm 2022-10-11 00:54:02 -07:00
justcool393 b398420246 i'm gonna hit sneks with a giant foam s 2022-10-11 00:52:01 -07:00
justcool393 456dd43bba replace "if not FEATURES" with wrapper 2022-10-11 00:33:23 -07:00
justcool393 ab2ab2ddf9 improve wrappers so they can be used with others 2022-10-11 00:33:23 -07:00
justcool393 940f815f84 loudly tell users they can't do this while suspended 2022-10-10 23:15:09 -07:00
Aevann1 00ee6d508d sneed 2022-10-11 04:00:09 +00:00
Snakes 33d99f86e6
Temporary deletion special case by Carp request. 2022-10-10 23:48:16 -04:00
Snakes 69f1b09a76
Restrict editing old posts (harmonize comments). 2022-10-10 23:40:08 -04:00
Aevann1 c381466389 tweak asset notifs 2022-10-10 14:13:43 +02:00
justcool393 75e593da00 Revert "feature required wrapper"
This reverts commit 8700bcc5ee.
2022-10-10 02:54:47 -07:00
Aevann1 30813fc719 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-10 11:06:32 +02:00
Aevann1 00b045c464 tweak env again 2022-10-10 11:06:27 +02:00
justcool393 f872f734ec constantify a bunch of things
* sign up follow id is now a thing (if not specified will just msg carp instead)
* notification thread id is also a constant now
* blackjackbtz id is a constant, used for i think special PM handling
2022-10-09 23:37:42 -07:00
justcool393 8700bcc5ee feature required wrapper 2022-10-09 23:16:05 -07:00
Aevann1 356c9f1219 add "(Admin)" to messages sent to users due to admin actions (for clarity to new users) 2022-10-10 08:11:17 +02:00
Aevann1 592c144454 make the button for removing streamers have a constant width 2022-10-10 07:42:04 +02:00
Aevann1 c2a5231ab5 remove trailing slashes in html files (I dont like them) 2022-10-10 07:40:33 +02:00
Aevann1 453f63c0e5 Merge branches 'frost' and 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-10 07:32:33 +02:00
Aevann1 5451b126a6 better system for 502.html 2022-10-10 07:32:08 +02:00
Aevann1 1e8ed876b3 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-10 05:27:37 +00:00
Aevann1 0fcb7a66ed PCM sneed 2022-10-10 05:26:40 +00:00
Aevann1 1b61d523fa minor cosmetic change 2022-10-10 07:25:32 +02:00
Aevann1 83aa914865 more consistency in templates 2022-10-10 07:23:02 +02:00
Aevann1 a20f5723bf make sure all external urls have rel="nofollow noopener noreferrer" 2022-10-10 07:22:18 +02:00
Aevann1 db929c7615 simplify 3 js functions 2022-10-10 06:56:39 +02:00
Aevann1 472aedb14e remove log items generated by awards for JL3 (since they cant print anymore) 2022-10-10 06:40:48 +02:00
Aevann1 df44613686 make it so when u ban someone for 3 days for example, it appears as "3 days" instead of "3.0 days" 2022-10-10 06:16:43 +02:00
Aevann1 da3593d4af sneed 2022-10-10 00:00:05 +00:00
justcool393 1111932b8c remove weird random check if it's an issue we can readd it 2022-10-09 13:13:55 -07:00
justcool393 6d5dcaec9a fix long post bot lol 2022-10-09 09:40:20 -07:00
Aevann1 e930b5f357 sneed 2022-10-09 16:20:15 +00:00
justcool393 d6f4e20f7d use constant for BBBB_ID instead of 12125 2022-10-09 07:03:21 -07:00
justcool393 a9064e7828 newline at eof 2022-10-09 06:52:41 -07:00
justcool393 56e800fd9d move basedbot to actions as well 2022-10-09 06:49:08 -07:00
justcool393 64cd774390 ree 2022-10-09 06:29:58 -07:00
justcool393 63c7fe0c29 move zozbot and longpostbot into the actions helpers 2022-10-09 06:28:18 -07:00
justcool393 87fd8ee57a comment sanity checks and constantization
* make HTML body length a constant and use it
* abort before uploads and other tasks if comment level is too deep
* what a nightmare of two functions, please do better next time
2022-10-09 05:54:46 -07:00
justcool393 c9ab2c515b remove some more vestiges
get_post and get_comment both handle this
2022-10-09 01:25:21 -07:00
justcool393 52472b838d don't allow banned users to join 2022-10-09 00:34:22 -07:00
justcool393 d8927294f4 fix 500 when no state is passed in to discord redirect function 2022-10-09 00:31:56 -07:00
justcool393 8ea52ba95c constantify comment body length limit and transfer limit 2022-10-09 00:20:28 -07:00
justcool393 b96d6a1ccb scope variables properly 🤤 2022-10-08 23:44:09 -07:00
justcool393 1ad12e0524 deduplicate more of this page's code 2022-10-08 23:44:09 -07:00
justcool393 13446a4708 remove duplicate code in the template 2022-10-08 21:26:41 -07:00
Snakes cf1844d6a4
Fix hat counter logic breaking Simps listing. 2022-10-08 23:55:40 -04:00
Snakes 10921331fa
Move user hat properties for userpage to model. 2022-10-08 16:30:27 -04:00
Snakes 8bb145d23c
Fix userpage hats owned display. 2022-10-08 16:12:03 -04:00
justcool393 360723f761 num hats fix (and pct fix too?) 2022-10-08 10:53:54 -07:00
justcool393 4baf7cfa42 make text gold when owned all hats 2022-10-08 10:44:39 -07:00
justcool393 d05cb09040 fix some minor formatting 2022-10-08 10:39:36 -07:00
justcool393 491d71a9b5 add owned hats to user page per fish request 2022-10-08 10:37:44 -07:00
justcool393 7025cbe983 don't include sbed users in songs 2022-10-08 10:14:17 -07:00
justcool393 8292ef8e7e fix clubbing posts 2022-10-08 08:59:31 -07:00