Commit Graph

160 Commits (e105035272553ddc6bd160fd200563312139175d)

Author SHA1 Message Date
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
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
Snakes 44ef4bc551
search: fix tsquery when quoted unstripped space. 2022-11-20 19:31:27 -05:00
Snakes 38ac92b4aa
search: escape apostrophes. 2022-11-18 16:55:15 -05:00
Snakes 2c81db79ef
Fix API for /comment/<cid>, /search/comments. 2022-11-18 15:33:07 -05:00
justcool393 4b9c702877 fix listing bugs 2022-11-15 03:28:39 -06: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
Snakes ebb3957f41
Eager load submission listing relationships. 2022-11-09 09:16:22 -05:00
Aevann1 50bcc81f14 give user an error when they give invalid page input 2022-11-07 23:34:43 +02:00
Aevann1 87cf4d13ff add cc post search parameter 2022-11-07 02:22:06 +02:00
justcool393 7f716a6e72 users and search: add status codes 2022-10-30 02:33:42 -05:00
justcool393 5d2f4d203b users: add is_visible_to function for checking user visibility to a certain other user 2022-10-30 02:31:21 -05:00
justcool393 3a6dfdf2de listings: constantify PAGE_SIZE as 25
magic numbers are bad, do better next time
2022-10-28 22:20:48 -05:00
Snakes be7be28182
Fix comment search query ampersand bug. 2022-10-27 18:24:12 -04:00
justcool393 c2b6c5903d fix 500 in search.py 2022-10-15 03:30:13 -07:00
justcool393 39aa59a37a add g.is_api_or_xhr so we can use it where we want to give API output
* also use v.client for strict API clients
2022-10-15 02:11:36 -07:00
Aevann1 7a6b4406ef remove redundant shadoban filters 2022-10-13 12:47:55 +02:00
Snakes e5af46c4ae
Fix shadow visibility logic. 2022-10-13 00:10:34 -04:00
Snakes 166e33dc38
Clarify architecture of sort_objects. 2022-10-12 04:05:26 -04:00
Aevann1 2aa281e8c8 refactor sorting again (untested) 2022-10-12 09:03:28 +02:00
Aevann1 b1abd33835 refactor sorting 2022-10-12 08:10:11 +02:00
justcool393 2004278791 syntax error fix 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 6c3b0f13da search and stuff 2022-10-05 23:45:27 -07:00
justcool393 1220d06eab some admin perms and also fix search 2022-10-05 22:37:50 -07:00
justcool393 d78d57ec79 all seeing eye permission 2022-10-05 21:59:06 -07:00
justcool393 2fc3044d5b shadowban perms and stuff 2022-10-05 19:24:37 -07:00
Snakes 6757831e0f
Sanitize more special characters in search. 2022-10-04 01:31:27 -04:00
Snakes 99b6b356f0
Add comment search "quoted phrase" behavior. 2022-10-02 15:50:05 -04:00
Snakes 0dfa4525fa
Remove special characters from search query. 2022-10-02 07:42:42 -04:00
Snakes 216022a5a0
Comments search: utilize lexeme config. 2022-10-02 06:24:03 -04:00
Snakes 701f64c91b
Change comment search to use tsvector. 2022-10-02 04:55:39 -04:00
Aevann1 7212fa44ef give ppl an explanation when searching comments 2022-10-01 11:38:14 +02:00
justcool393 78b668a870 don't duplicate checks for users 2022-09-30 15:51:17 -07:00
justcool393 7e3f43c9ab
unperson shadowbanned users (#373)
* unperson shadowbanned users
if a shadowbanned user copes, does anyone hear them seethe?

* unperson shadowbanned users (by id)

* don't import that

* Add include_blocks.
We don't always want to request blocks from the db when we have a user set

* block shadowbanned users from hole mod tools

* don't allow awarding shadowbanned things

* fix conflict

* gracefully use get_account when specified and also add include_blocks flag to get_account as well
2022-09-30 14:00:58 -07:00
Aevann1 52c5dd6028 disable /search/comments for now 2022-09-30 14:20:53 +02:00
Aevann1 4abf75edc0 add error codes 2022-09-12 11:52:07 +02:00
Aevann1 0c32d56cd6 casino + style shit 2022-09-05 01:15:37 +02:00
Aevann1 60709a7253 add error handling for incorrect time format in search 2022-08-31 03:48:20 +02:00
Aevann1 5345558a43 support unix time in search time filtering too 2022-08-30 03:15:54 +02:00
booosy d2556bc718
Make sure the user has actually input some token to search with when doing exact searching (#337) 2022-08-24 04:59:51 -04:00
booosy be38c1e980
Add title and exact boolean operators to search (#333) 2022-08-23 22:54:27 -04:00
Aevann1 1d7b19f485 make "before" and "after" human-readable 2022-08-17 21:09:15 +02:00
Aevann1 133508fc6a add "before" and "after" search keywords 2022-08-15 21:02:23 +02:00
Snakes 6a7a3b1821
Hide shadowed user content in more contexts.
- Search: posts by shadowed user.
  - Search: shadowed users in search for users.
  - Direct links to shadowed user posts display as removed.
  - Other users' profile comments listings hide comments on shadowed
    posts. Users can still see their own comments on shadowed posts.
    Similar to ghosted comment logic.
2022-08-08 18:21:59 -04:00
Aevann1 85c4ff1621 make user search also user original_username for searching 2022-07-30 20:29:07 +02:00
Aevann1 ec3b4357cf refactor sorting and time filter 2022-07-09 12:32:49 +02:00
Aevann1 470b046702 compile regext outside of routes 2022-07-06 13:49:13 +02:00
Snakes 95f9fbfab1 Add searching for "exact phrases" to search. 2022-07-04 04:19:41 -04:00
Aevann1 2c54180ddc remove print statement I forgot 2022-07-01 13:28:00 +02:00