Commit Graph

460 Commits (bbaa6cd6b0be3889d4b8495cc9b2e230eef344ff)

Author SHA1 Message Date
Aevann1 59e0beebb2 minor change 2022-12-11 21:19:10 +02:00
Aevann1 235cfb0dfa do this https://stupidpol.site/h/marsey/post/130585/marsey-lost-and-found-who-made/3224501?context=8#context 2022-12-11 20:52:15 +02:00
Aevann1 1a1a55712e cachebust default_thumb_video.webp 2022-12-10 15:19:04 +02:00
Snakes 9160a853ec
Remove !YOU!.
Security mess and stale joke.
2022-12-05 20:06:04 -05:00
Aevann e105035272 remove country club system and replace it with a 3 tier thing: (#41)
- /h/masterbaiters: 1 TS - for gayops

- /h/countryclub: 1000 TS - for anything requiring secrecy and doesnt need critical mass - have to make it a rule that u cant post gayops in /h/countryclub

- /h/chudrama: 5000 TS - for chad+stud posts

EDIT: i removed the /h/masterbaiters gate, but u can bring it back if u want
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #41
Co-authored-by: Aevann <aevann@noreply.fsdfsd.net>
Co-committed-by: Aevann <aevann@noreply.fsdfsd.net>
2022-12-04 18:39:06 +00:00
Aevann1 3542703ced Revert "make it so only the post author can declare winner and not all admins"
This reverts commit 9e1425d93e.
2022-12-03 00:08:46 +02:00
Aevann1 9e1425d93e make it so only the post author can declare winner and not all admins 2022-12-03 00:06:57 +02:00
Aevann1 b6efc27551 use "i" instead of "assets/images" 2022-11-30 00:52:19 +02:00
justcool393 e9887059d1 use `self.__class__.__name__` for `__repr__` 2022-11-29 15:02:38 -06:00
justcool393 67bfe5a5bd remove unnecessary `str()` 2022-11-29 14:29:27 -06:00
Aevann1 c9f44b5777 rename data-click to data-click2 2022-11-28 06:35:33 +02:00
justcool393 5381074617 sigs: limit to 250px (configurable by variable) 2022-11-27 12:15:33 -06:00
Aevann1 1f4fc16d44 add !YOU! to post bodies and to comments 2022-11-27 03:31:46 +02:00
Aevann1 b93bf4daae dont convert username to lowercase for !YOU! 2022-11-26 22:11:07 +02:00
Aevann1 7cb4740426 snned 2022-11-26 07:02:34 +02:00
Aevann1 9c773b02a5 sneed 2022-11-26 06:59:07 +02:00
Aevann1 62ffe2d628 use postToast in betting so the js deducting coins only execute if responde code is < 300 2022-11-21 03:00:16 +02:00
justcool393 83963470e8
user can_view functions (#460)
* user: move can_see_to user class

* stub out can_see in comments and posts

* make can_see a classmethod so it's usable for loggedoutfriends

* test

* kill me now

* threelargeclassesmating

* dfdfdfdfdfdfd

* sdsdsdsd

* classmethod should be above i think

* Revert "classmethod should be above i think"

This reverts commit df1772eb9e7e71bf7b89123f6277b648de2b1af3.

* Revert "Revert "classmethod should be above i think""

This reverts commit 32883406c2e2916fc6c436611376a1817c16cb84.

* test rewritnig thing

* go home python

* what the fuck python

* fix AttributeError

* sdsdsdsdsdsd

* lazy and user and stuff

* test

* Revert "test"

This reverts commit 45af5bb3d45f3ec17126ab117d494ec978062a38.

* merge

* newline

* test

* test 2

* Revert "test"

This reverts commit 196dae677e2ee8cd29261c93dcb747087cb399b6.

* revert test

* fix merge error

* fix import error ciruclation i think

* sdsd

* add type annotations back

* deleted_utc

* isinstance

* user_can_see in jinja and remove unnecessary things

* a bunch of stuff
remove can_see from comment and post
expand can_see to messages

* antiannoyingamountsofwhitespace

* fix for chudrama

* improve prev
2022-11-17 16:02:08 -05:00
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
Aevann1 f81205a427 hide poll scores until the user votes 2022-11-11 21:02:57 +02:00
Aevann1 05b7e79b76 remove the code i added for rdrama.com 2022-11-11 15:52:18 +02:00
Aevann1 87d5a0de46 improve ban modal and add chud modal 2022-11-05 04:12:22 +02:00
Aevann1 995d3cbc98 add postToastReload 2022-11-04 23:44:44 +02:00
Aevann1 d4a99c05e9 rename postToast -> postToastSwitch and postToastCallback -> postToast for clarity 2022-11-03 21:08:22 +02:00
Aevann1 07a12380de accomodate alt domain 2022-11-03 17:29:14 +02:00
Aevann1 f73c6d46df accomodate rdrama.com users 2022-11-02 08:31:04 +02:00
Aevann1 2ba1a1e86e remove postToast compatability function 2022-10-30 17:10:07 +02:00
Aevann1 b9c482712a constantify file extensions 2022-10-30 16:55:43 +02:00
justcool393 61cc1ddcb7 inline is_image 2022-10-28 20:52:19 -05:00
Aevann1 ad358650e1 remove retarded bullshit I wasn't consulted about 2022-10-27 19:53:08 +02:00
gooseman 8b98eabbb9 simultaneous hosts 2022-10-24 15:28:43 -07:00
Aevann1 44fca7f086 ripbozo 2022-10-17 21:13:33 +02:00
justcool393 60284daa8e replace all of the duplicated age strings with make_age_string 2022-10-15 11:11:43 -07:00
Aevann1 a5eaeb809d fix 500 error 2022-10-13 16:26:35 +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 0ba14cb771 same as last commit 2022-10-11 16:44:43 +02:00
Aevann1 acbfbb07ce rework "are you sure?" and make it work on subscribing to posts and reverting admin actions 2022-10-08 08:06:46 +02:00
Aevann1 aa8e7055fb rework env vars a bit 2022-10-08 02:43:04 +02:00
Snakes e3bed60169
WPD: temporarily rewrite /videos/ post URLs. 2022-10-07 01:43:04 -04:00
justcool393 e372158729
Merge branch 'frost' into permissions-refactor 2022-10-06 19:05:42 -07:00
justcool393 dd7e0abd6a fix some conflicts 2022-10-06 19:04:27 -07:00
Aevann1 4d15d76dfa show the earlylife parantheses in more places 2022-10-07 01:31:09 +02:00
Aevann1 3ffac6f0f6 fix tranny slur replacement in plainbody and plaintitle 2022-10-07 00:34:25 +02:00
Aevann1 8b1cf50965 fix misplaced ")" resulting in 500 error 2022-10-06 23:17:35 +02:00
justcool393 6911101e29 post bet distributions 2022-10-05 22:59:27 -07:00
justcool393 04f24cd8fd content moderation permission level
holy crap there's a lot
2022-10-05 17:57:08 -07:00
justcool393 651355afdf should be no semicolon there 2022-10-05 16:37:16 -07:00
justcool393 4037eed228 use constant instead of literal 200 for poll bets 2022-10-04 23:07:53 -07:00
justcool393 635e35204e i'm an idiot 2022-10-04 17:08:15 -07:00
justcool393 31725a0684
security: don't leak post contents to embeds and other stuff for removed/deleted posts 2022-10-04 16:48:01 -07:00
Snakes 4a54c6219a
Add trailing final newlines to source files.
Touched a ton of files to finally standardize on having trailing
final newlines, as best practice recommends and so our devs stop
accidentally fighting each other over it.

This was performed automatically with the following:
git ls-files -z '*.py' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
git ls-files -z '*.css' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2022-09-29 01:43:29 -04:00
Aevann1 618572e413 reload on declaring winner 2022-09-22 22:24:22 +02:00
Aevann1 d80a2f2331 add "are you sure?" to "declare winner" 2022-09-22 22:11:56 +02:00
Aevann1 b980c63d1b Revert "created_utc refactor"
This reverts commit 791aececbb.
2022-09-19 22:40:33 +02:00
Aevann1 791aececbb created_utc refactor 2022-09-19 21:24:16 +02:00
Aevann1 f54791cc4c remove categories 2022-09-19 20:04:30 +02:00
Aevann1 f7727f1029 refactor sigs 2022-09-19 19:51:40 +02:00
Aevann1 ae90eb1cf2 simplify house checking logic 2022-09-11 03:53:16 +02:00
Aevann1 c1aae95d16 restore "notify followers" checkbox 2022-09-10 09:00:45 +02:00
Aevann1 66bf74b444 fix whoopsie 2022-09-08 21:16:57 +02:00
Aevann1 6077f09ca9 make bets better 2022-09-08 20:25:45 +02:00
Aevann1 f8cd1bea03 make the poll code much worse 2022-09-06 01:33:58 +02:00
Aevann1 da52d00ad3 fix 500 errors 2022-09-06 00:55:26 +02:00
Aevann1 ef5c3c89ee deduplicate polls 2022-09-06 00:55:01 +02:00
Aevann1 62d077576f change poll- and choice- and -bet to -option 2022-09-06 00:54:05 +02:00
Aevann1 73dbb2dd7e change t2_ and t3_ to p_ and c_ 2022-09-06 00:52:22 +02:00
Aevann1 8085de14e4 make only house members able to vote on polls in their house hole 2022-09-06 00:30:44 +02:00
Aevann1 04e47017c1 fix chudrama for paypigs 2022-08-31 18:49:31 +02:00
Snakes 6acf4ff569
WPD: disable cosmetic awards on distinguished posts. 2022-08-30 23:18:59 -04:00
Aevann1 fc01eb6c1d make the ((( in earlylife award stack along with the time 2022-08-30 13:54:43 +02:00
Aevann1 0f11312d24 add house awards 2022-08-27 04:57:19 +02:00
Aevann1 45d5f52388 restore betting 2022-08-26 23:53:17 +02:00
Aevann1 1ed41d80c0 fix rdrama.org thumbnails 2022-08-26 00:55:30 +02:00
Aevann1 11d7f34ad0 allow hole jannies to change the hole marsey + cachebust all site assets 2022-08-25 00:22:44 +02:00
Aevann1 9456fa1aa6 fix 500 error i introduced 2022-08-23 20:05:11 +02:00
Aevann1 be251e7756 give paypigs access to chudrama 2022-08-22 22:52:00 +02:00
Aevann1 797cf61d3f let chuds into /h/chudrama 2022-08-21 15:57:56 +02:00
Aevann1 3140adfbdb small change to can_see logic 2022-08-20 15:05:02 +02:00
Aevann1 725179dc6c add exception in can_see for offsites 2022-08-20 02:10:13 +02:00
Aevann1 da4070b62a reduce chudrama requirement from 20k to 5k 2022-08-20 00:45:21 +02:00
Aevann1 e1e7258e7a add def can_see(v) 2022-08-20 00:36:28 +02:00
Aevann1 2957db79ce site_preview change for rdrama 2022-08-12 00:56:33 +02:00
Snakes 1411018f8d Add post categories.
Implemented for LGB but can likely be used for WPD and other future
sites. Similar to a reddit post flair. Provides:
  - Admin panel for Category management.
  - Category selection on post submission.
  - 'Recategorize' post action.
2022-08-07 02:57:30 -04:00
Aevann1 7a484859da fix 500 error 2022-07-12 20:05:56 +02:00
Aevann1 334c5d449b change deux assets 2022-07-12 02:35:40 +02:00
Aevann1 ee11a28636 fix flag filtering 2022-07-11 20:13:00 +02:00
Aevann1 ae45b45bfb refactor json again 2022-07-11 19:33:26 +02:00
Aevann1 bc4074f9aa fix api 500 errors 2022-07-11 19:19:48 +02:00
Aevann1 27b1ed83cc refactor json a little bit and fix https://chapotraphouse.club/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2278188?context=8#context 2022-07-11 15:14:34 +02:00
Aevann1 4c2cb82f48 change deux' assets 2022-07-10 22:27:56 +02:00
Aevann1 ec3b4357cf refactor sorting and time filter 2022-07-09 12:32:49 +02:00
Aevann1 b617321529 move all env-getting to .const 2022-07-08 18:21:13 +02:00
Aevann1 3245656787 show timestamps in the user timezone 2022-07-03 09:41:25 +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
Aevann1 f56be06eb8 add hole pinning 2022-07-02 01:11:48 +02:00
Aevann1 070945d98a cut down on the number of queries 2022-06-29 09:22:18 +02:00
Aevann1 5661cdb271 Revert "try to cut down on number of db queries"
This reverts commit c674c6a056.
2022-06-29 08:43:20 +02:00
Aevann1 c674c6a056 try to cut down on number of db queries 2022-06-29 08:14:25 +02:00
Aevann1 4fae28a2a2 fix child comment highlighting 2022-06-28 02:41:25 +02:00
Aevann1 52a8a219ae make poorcel-mode device-specific 2022-06-27 05:46:32 +02:00