Commit Graph

75 Commits (7bb3959e8546e29c05e3b748afca6b5e518093ab)

Author SHA1 Message Date
Aevann c8a3a5a569 prevent malicious use by excluding user subreddits 2023-09-17 22:56:00 +03:00
Aevann 1a6df0086c fix for old versions of reddit api 2023-09-14 23:19:06 +03:00
Aevann 1bd7a7a81c stop spam 2023-09-14 22:57:48 +03:00
Aevann 112841cf9e make offsite_mentions_task take 3 seconds instead of 14 seconds 2023-09-14 20:36:15 +03:00
Aevann e489314ab9 remove repeated commit statements 2023-09-14 01:19:07 +03:00
Aevann dfb195714a simpler code 2023-09-12 23:28:10 +03:00
Aevann 9ce6027621 remove print-debugging 2023-09-12 23:27:43 +03:00
Aevann 645d510d6d fix bug with offsite mentions 2023-09-12 23:26:26 +03:00
Aevann 4b1fb5eec1 print-debugging 2023-09-12 22:55:05 +03:00
Aevann b2c17d1701 dont break 2023-09-12 22:54:17 +03:00
Aevann 35f7b46fc8 handle error 2023-09-12 17:32:07 +03:00
Aevann b0a05e5871 handle old comments 2023-09-11 21:39:23 +03:00
Aevann c4b12d01b5 im retarded? 2023-09-11 21:16:16 +03:00
Aevann 6fe7c655d2 same as last commit 2023-09-11 21:12:10 +03:00
Aevann b7e3f7719e try smth to fix error 2023-09-11 21:06:41 +03:00
Aevann b0f6e81ccc restore offsite_mentions_task for normal every-5-minute usage 2023-09-11 20:55:46 +03:00
Aevann b1ae6a324a restore y'all-seeing-eye function using pullpush (initial commit) 2023-09-09 21:51:09 +03:00
Aevann b105151af5 remove weird redundancy 2023-09-09 18:17:02 +03:00
Aevann ef3564c1a1 stop using NOTIFICATION_THREAD 2023-08-23 13:42:25 +03:00
Aevann 8beb2d7e8e remove typing (useless code bloat) 2023-07-30 03:42:06 +03:00
Aevann d9bed378a9 complement 32fa466e6a 2023-06-23 16:46:42 +03:00
Aevann 32fa466e6a rename submissions to posts 2023-06-08 02:26:32 +03:00
Aevann 57765f0776 revert sqlalchemy changes 2023-03-16 08:27:58 +02:00
Aevann f768d81103 keep db sessions open 2023-03-15 05:58:00 +02:00
Aevann 79da5014b3 fix reddit push notifs 2023-03-06 18:53:36 +02:00
Aevann 287c77ce2e fix missing import 2023-02-24 19:58:09 +02:00
Aevann e37031c4dd make sure g.db.flush() is always above _push_notif_thread 2023-02-24 04:36:25 +02:00
Aevann 5a511c00a8 include username in push notifs 2023-02-24 04:22:47 +02:00
Aevann 6f981a58b8 give push notifs for personal reddit mentions 2023-02-24 04:04:54 +02:00
Aevann 88814ee208 expand blackjack 2023-02-07 05:31:49 +02:00
official-techsupport 0f4e66c070 Halve the offsite notifs spam (#83)
don't notify for /u/Automoderator messages

Co-authored-by: official-techsupport <official_techsupport@protonmail.com>
Reviewed-on: #83
Co-authored-by: official-techsupport <official-techsupport@noreply.fsdfsd.net>
Co-committed-by: official-techsupport <official-techsupport@noreply.fsdfsd.net>
2023-01-13 11:36:10 +00:00
Aevann 044664a25e get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
Aevann1 7fabf323f8 remove leftover print statements for debugging 2022-12-21 00:35:02 +02:00
Aevann1 bd02df4177 fix reddit mention notifs 2022-12-20 02:36:53 +02:00
Aevann1 f6c1f94614 more print debugging 2022-12-20 02:27:09 +02:00
Aevann1 4594a6ecb8 more print debugging 2022-12-20 02:23:36 +02:00
Aevann1 569f0269e3 print debugging for reddit mentions 2022-12-20 02:20:16 +02:00
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