forked from rDrama/rDrama
1
0
Fork 0
Commit Graph

247 Commits (fe981e97d682e30bab6429173875b271be9b91b6)

Author SHA1 Message Date
Aevann eb59a6a1bc reduce automute from 60 mins to 10 mins 2023-03-04 20:16:38 +02:00
Aevann 8c495c914a default ratelimit doesnt apply implicitly if theres other @limiter.limit before the function, so add it explicity before all functions 2023-02-26 10:41:04 +02:00
Aevann bc93d6c7b7 reduce chat history from 500 messages to 250 to make it load faster 2023-02-19 10:47:20 +02:00
mummified-corroding-granny 58e985525b chat: prevent usernames sticking after rename and color change (#123)
Kindly,

As per $title.

Currently, if a user changes name or color while in chat, the username will stick forever (until clearing all sessions with a process restart).

This PR fxes both of these situations. The code is getting ugly and would benefit from using dictionaries instead of lists, but I suspect there are other priorities.

Thanks,
granny

Reviewed-on: rDrama/rDrama#123
Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
2023-02-17 13:58:02 +00:00
mummified-corroding-granny e2adf9e53d Chat: add minimalistic chat session tracking and fix shadow user spy problem (#121)
Kindly,

Not sure if this is too dramaphobic. I also went with the just enough (TM) approach

The issue this PR intends to fix:
1. user has no chat tabs open
2. user opens two chat tabs
3. user closes second chat tab
4. user disappears from sidebar and user count (because was removed from online py list)
5. user (became shadow user) can now spy on the chat without being listed

Thanks,
granny

Reviewed-on: rDrama/rDrama#121
Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
2023-02-16 13:41:58 +00:00
Aevann 88814ee208 expand blackjack 2023-02-07 05:31:49 +02:00
Aevann 1529e70abd remove /admin/chat for being unused and redundant to /contact 2023-01-30 11:57:00 +02:00
Aevann d5c23785d0 fix chat count 2023-01-28 17:10:45 +02:00
Aevann 83b34832b8 fix chat count 2023-01-28 12:44:15 +02:00
Aevann 159773cf73 show namecolor in online listing 2023-01-27 20:15:38 +02:00
Aevann 4a795d924f show profile pictures in chat online list 2023-01-27 19:52:47 +02:00
Aevann 349fa17836 use exlamation marks instead of dots in responses to users 2023-01-27 13:57:29 +02:00
Aevann 83b22560eb dont use abort in chat 2023-01-27 09:07:58 +02:00
Aevann 9327ef6eed chat fixes 2023-01-25 03:17:39 +02:00
Aevann c1b1ccedff chat improvements 2023-01-24 07:28:56 +02:00
Aevann d9553d2636 chat anti-spam 2023-01-23 08:04:02 +02:00
Aevann 0126bb9729 cut down on chat spam 2023-01-23 04:45:34 +02:00
Aevann 921b9b1a2e re-enable autocheck for ratelimiting 2023-01-23 04:38:39 +02:00
Aevann 3ab09c0e20 fix 500 error on disconnect chat 2023-01-23 02:42:30 +02:00
Aevann 8d74d69d76 chat improvements 2023-01-22 09:19:23 +02:00
Aevann bb6d798647 fix quoting new messages 2023-01-22 08:00:50 +02:00
Aevann 83b0f1ebf5 fix chat 2023-01-22 06:48:48 +02:00
Aevann dd80ac2530 same as last commit 2023-01-22 06:46:00 +02:00
Aevann 21d2ba8bd3 debugging 2023-01-22 06:44:39 +02:00
Aevann fdd05d36be fixes to chat 2023-01-22 06:19:18 +02:00
Aevann 3fe80c4f4d same as last commit 2023-01-22 05:18:19 +02:00
Aevann 542410eb27 fixes to chat 2023-01-22 05:16:37 +02:00
Aevann 1ee213f742 another chat rework 2023-01-22 04:43:28 +02:00
Aevann 3e5599cd96 stop separating online counter by chat type 2023-01-22 02:11:01 +02:00
Aevann f64f0ddaf0 fix last commit 2023-01-21 12:54:15 +02:00
Aevann 6cc7d311a3 only emit catchup once 2023-01-21 12:50:30 +02:00
Aevann f2fdefa8cd chat overhaul 2023-01-21 12:36:21 +02:00
Aevann a40dee5bd8 improve user ratelimiting 2023-01-21 06:39:46 +02:00
Aevann a33bbc8fc2 >= 2 instead of >= 1 2023-01-20 06:35:23 +02:00
Aevann 2511054947 fix leak of admin chat 2023-01-20 06:34:32 +02:00
Aevann 70ab540717 make the online listing specific to the type of chat 2023-01-20 06:25:35 +02:00
Aevann acc71d4cae add /admin/chat and dont store profile_url in chat dict 2023-01-20 06:10:25 +02:00
Aevann 366cfd69c6 Revert "quadruple message limit in chat"
This reverts commit d219bedba6.
2023-01-20 03:15:11 +02:00
Aevann d219bedba6 quadruple message limit in chat 2023-01-20 02:50:15 +02:00
Aevann 30dd9bc5d5 restore chat for rdrama 2023-01-20 02:12:36 +02:00
Aevann 044664a25e get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
Aevann 8ee189022b seething hatred 2022-12-30 21:01:47 +02:00
Aevann c4872ecb07 Revert "attempt to fix ratelimiting user"
This reverts commit 99597fc36c.
2022-12-30 20:43:13 +02:00
Aevann 99597fc36c attempt to fix ratelimiting user 2022-12-30 20:40:58 +02:00
Aevann 9a8c986f93 attempt to fix ratelimiting user 2022-12-30 20:33:07 +02:00
Aevann bc453f8057 add missing import 2022-12-26 05:14:02 +02:00
Aevann 40305f01f2 dont lock jannies out of /chat 2022-12-26 04:49:14 +02:00
Aevann c4e4a8d853 give jannies push notifs for chat 2022-12-25 22:30:50 +02:00
Aevann d30d6b8314 limit chat on rdrama to jannoids 2022-12-25 22:13:29 +02:00
Aevann ecfcbaf3df make hat_active return a tuple 2022-12-25 00:21:49 +02:00
Aevann 5d6d108dd5 remove redundant domain bans 2022-12-23 00:25:31 +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: rDrama/rDrama#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
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: rDrama/rDrama#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 c0f1b875d0 chat: ratelimit chat lol
apparently we haven't done that xdd
2022-11-29 19:36:09 -06:00
justcool393 5056f09380 chat: fix 500 on some... weird... state... i think?
cache: get out of jinja templates
chat: threshold is now a const
2022-11-29 15:49:23 -06:00
justcool393 ae50cc2772 const: rename constants from LIMIT to MINIMUM
the new name is much much clearer
2022-11-26 14:20:44 -06:00
Aevann1 bb153e541d Revert "you posts: constantify truescore requirement"
This reverts commit 1b721126a2.
2022-11-26 22:09:07 +02:00
justcool393 1b721126a2 you posts: constantify truescore requirement 2022-11-26 13:39:31 -06:00
Aevann1 caabaf0c6f expand IS_LOCALHOST 2022-11-21 00:16:49 +02:00
justcool393 d1197bac82 chat: sanitize raw body 2022-11-16 08:00:04 -06:00
justcool393 f1bfb87243 chat: permission for mute bypass 2022-11-16 07:00:03 -06:00
justcool393 ee8df1e3f1 chat: mops are unmutable 2022-11-16 06:38:24 -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 dd912addd1
chat: allow dev envs, clarify error message. 2022-11-13 06:43:08 -05:00
justcool393 d7f07dcd67 chat: allow club users into chat as well 2022-11-13 05:37:53 -06:00
justcool393 681d8b482a chat: impose truescore chat limit 2022-11-13 05:31:48 -06:00
Aevann1 7f2630f4c3 increase chat limit from 100 msgs to 500 (yolo or smth) 2022-11-11 19:19:24 +02:00
Aevann1 05b7e79b76 remove the code i added for rdrama.com 2022-11-11 15:52:18 +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
justcool393 8fe73cb68e refactor blackjack a bit 2022-10-20 19:28:05 -05:00
Snakes 912560327f
Apply anti-grooming logic to chat. 2022-10-16 16:19:13 -04:00
justcool393 53a5343a55 use ban permission for muting and also add a user home permission (wonder if should be the same as mop perm) 2022-10-05 22:54:48 -07:00
justcool393 04f24cd8fd content moderation permission level
holy crap there's a lot
2022-10-05 17:57:08 -07:00
Aevann1 3bf62c6ff0 add missing ban_reason when shadowbanning 2022-10-02 13:31:02 +02:00
Outrun Colors 430cbe676c
Nest if condition in chat 2022-09-27 00:31:23 -05:00
Outrun Colors 300a5164f6
Add DMing to chat 2022-09-27 00:15:22 -05:00
Outrun Colors ba19d3aaa7
Censor quoted text 2022-09-24 22:41:57 -05:00
Outrun Colors b2d185ada0
Fix that 2022-09-24 17:09:54 -05:00
Outrun Colors 695159052b
Add typing debounce/enable quoting 2022-09-24 17:05:50 -05:00
Outrun Colors 6b117decb8
Tick version 2022-09-24 15:36:56 -05:00
Snakes 1fe02b7743
Chat rework deployment infra fixes. 2022-09-24 00:26:44 -04:00
outruncolors 484de39566
[DO NOT MERGE] Chat restructure (#360)
* Create new subdirectory for chat-related stuff

* Gitignore

* Have new code show up on chat

* Have new code show up on chat

* Fix config issue

* More script stuff

* Create UserInput components

* More chat changes

* More updates to chat

* Add chat:watch script

* Move up state and pass down

* Match up existing functionality entirely

* Match up existing functionality entirely

* Send a message when hitting Enter

* feature based directories

* First crack at emoji drawer

* Leave everything in a fucked up state ugh

* Leave it in a better state

* Stop for the night

* Decouple by abstract chat functionality to provider

* Wait a minute...

* Small chat restructure

* Prepare for notifications

* Add root context

* Flash number of messages

* Read this and u die

* Add quote functionality

* Couple tweaks

* Shallowenize the features dir/

* Add activity list

* Ch-ch-ch-ch-ch-changes

* Enable moving drawer

* Hover style on activities

* UserList changes

* Add emoji processing logic

* Duhhhh

* Scroll to top when changing query

* Put the emoji in the drawer

* Improve emoji drawer

* Add emoji genres

* Do not show activities

* Add feature flag technology

* Fix issue where own messages were triggering notifications

* Adjust startup scripts

* Responsive part 1

* Styling changes for emoji genres

* More emoji drawer styling

* Add QuickEmojis

* Re-add classnames

* Set version

* Modify build script

* Modify build script

* Mild renaming

* Lots of styling changes

* Leggo.
2022-09-23 22:49:40 -05:00
Aevann1 e315c56f7b fix this https://rdrama.org/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2737764?context=8#context 2022-09-17 16:39:50 +02:00
Aevann1 2fb4ebdcb0 minor sanitize refactor 2022-09-16 18:30:34 +02:00
Aevann1 41de3c8fab disallow permabanned from seeing chat 2022-09-16 15:06:02 +02:00
Aevann1 18a530a330 wtf 2022-09-10 11:41:59 +02:00
Aevann1 ee630e55c9 testing 2022-09-10 11:40:57 +02:00
Aevann1 8f0b2ea9c3 test on devrama 2022-09-10 11:31:51 +02:00
Aevann1 b3a56ca168 more hat shit 2022-09-05 06:33:08 +02:00
Aevann1 15732114d9 try making hats work in popover 2022-09-05 06:21:06 +02:00
Aevann1 49bcd0543d add hats to chat, part I 2022-09-05 05:04:48 +02:00
Aevann1 f1d70567e4 remove chat logging 2022-08-26 18:17:12 +02:00
Aevann1 e7b997fd01 testing on prod 2022-08-26 18:11:01 +02:00
Aevann1 bdc0727ac2 testing on prod 2022-08-26 17:53:40 +02:00
Aevann1 bcaa74786e testing on prod 2022-08-26 17:51:13 +02:00
Aevann1 4538f5642f log chat 2022-08-26 17:37:06 +02:00
Aevann1 d15b416397 add "just now" to chat messages delievered by sockets 2022-08-26 01:20:17 +02:00
Aevann1 268216a537 Revert "make chat count 0 in localhost"
This reverts commit 4a111df278.
2022-08-23 17:18:59 +02:00
Aevann1 4a111df278 make chat count 0 in localhost 2022-08-22 23:02:20 +02:00