Commit Graph

38 Commits (ab41db22b77a211e89e2b88a63a342f285d79868)

Author SHA1 Message Date
justcool393 ab41db22b7 [DO NOT MERGE] multiple sub banners (#59)
allows multiple sub banners

Snakes note: By request of Carp, especially for WPD.

Co-authored-by: justcool393 <justcool393@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #59
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-11 23:44:34 +00:00
Aevann1 e66234eb6a fix offsitementions 2022-12-04 21:48:28 +02:00
Snakes 885601e0ab
Fix offsitementions on localhost testing. 2022-11-30 19:24:45 -05:00
Aevann1 e1ed46fa36 rework reddit notifs - testing on pcm lol 2022-12-01 00:29:13 +02:00
Snakes 312abcbed7
offsitementions: use proper cache key in setter. 2022-11-30 15:44:01 -05:00
justcool393 767cc467bb marseys: cache marseys and emojis and fun stuff (#15)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #15
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-11-27 16:59:36 +00:00
Aevann1 f272989735 Revert "stop adding target="_blank" in the backend and move it to the frontend (to accomodate PWA users) - THANK YOU GEESE I LOVE YOU SO MUCH (#473)"
This reverts commit 88f3cd519d.
2022-11-21 19:37:38 +02:00
Aevann1 88f3cd519d
stop adding target="_blank" in the backend and move it to the frontend (to accomodate PWA users) - THANK YOU GEESE I LOVE YOU SO MUCH (#473)
* test

* bleg

* remove User.newtab and see if anyone complains (#471)

* fddf
2022-11-21 07:14:26 -08:00
Snakes 0095012e02
Fix offsitementions erroring on AEVANN_ID.
Also re-wrap the string literals for soft ruler 80, hard ruler 100.
Who are you people who read code with word wrap enabled.
2022-11-21 00:58:17 -05:00
Aevann1 bb8877a5d3 dont send me offsitemention notifs 2022-11-20 18:33:16 +02:00
Aevann1 aeb10e1ec6 exclude /r/SubSimGPT2Interactive 2022-11-15 16:44:08 +02: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
justcool393 f4f03f6582
all seeing eye: rework reddit notifs a bit (#445)
* all seeing eye: rework reddit notifs a bit
this should be more reliable and catch more of these when they're sent

* fix reddit notifs to properly use fewer queries
2022-11-13 06:00:05 -05:00
Aevann1 d5ab813499 dont give offsite notifs from redditors with "Bot" in the name 2022-11-11 19:18:41 +02:00
Aevann1 227d074da7 remove redundant "noreferrer" 2022-10-29 23:46:35 +02:00
justcool393 d07a6cbc08 remove bot mentions 2022-10-17 14:44:44 -05:00
Aevann1 afd11e376f fix 500 error 2022-10-14 19:15:29 +02:00
Aevann1 77312317f3 get rid of Boolean columns for permenant awards 2022-10-14 18:59:49 +02:00
justcool393 48384ba8e5 convert a couple of the old constantified permissions to the new system
i don't want to break something so i'm keeping one of them for now but it just links
2022-10-07 01:50:20 -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 37e1f25624 make using proxies only happen in 3 circumstances again 2022-09-26 06:01:25 +02:00
Aevann1 517e62e61b add proxies on pushshift requests 2022-09-26 04:40:31 +02:00
Aevann1 dd0f8fbed7 proxy all requests we make 2022-09-25 05:23:50 +02:00
Aevann1 2fb4ebdcb0 minor sanitize refactor 2022-09-16 18:30:34 +02:00
Aevann1 1fbefa7f69 fix wpd reddit mention spam 2022-07-17 19:14:01 +02:00
Aevann1 5ed43762aa fix reddit notif spam 2022-07-12 00:55:40 +02:00
Aevann1 9ea0f46250 tweaking offsite mentions a little 2022-07-10 15:02:24 +02:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 e121523a42 fix accidential greentext in reddit mentions 2022-07-03 04:13:25 +02:00
Aevann1 cff34fb3a4 reducing query volume, #2 2022-06-26 03:11:02 +02:00
Aevann1 233f24c0c4 make reddit notifs look neater (again) 2022-06-23 01:45:09 +02:00
Aevann1 262138b542 make reddit notifications look neater 2022-06-23 01:16:59 +02:00
Aevann1 8f2c2885d2 include psot body in reddit mentions too 2022-06-23 00:40:53 +02:00
Marco Rebhan 3c5e2c9455 Include message text in off-site mentions 2022-06-20 18:32:46 -04:00
Snakes 28002844e4 offsitementions: Fix notif logic. 2022-06-10 22:04:17 -04:00
Snakes 78d784533c Fix syntax & imports in offsitementions.py 2022-06-10 11:13:32 -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 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