101 Commits

Author SHA1 Message Date
Roardom
820946c2b6 refactor: chatbox user chat status
Only save the user's chat status in one place, and sync it with the server when it's updated.
2025-07-20 10:18:17 +00:00
Roardom
ab0851f73a update: upgrade to phpstan 2 2025-02-24 17:19:39 +00:00
Roardom
8e455ef448 fix: api chat controller json return types
Makes static analysis happy.
2025-02-11 06:06:17 +00:00
HDVinnie
af21147802 remove: hdvinnie/laravel-html-purifier in preparation for octane 2024-10-22 22:10:43 -04:00
Roardom
ad48d9bfb8 fix: check message existence before deletion 2024-09-29 05:32:20 +00:00
Roardom
5a9ae37921 update: use system user id constant in more places 2024-08-26 09:28:44 +00:00
Roardom
73da1a1eb3 add: types to chat repository
Just absolute minimal changes for now to prevent breakage as much as possible.
2024-08-10 03:15:36 +00:00
Roardom
2e91e1157f fix: some user group permissions
These permissions were never meant to be directly edited by staff. They should never have been added to the staff user edit page as it just caused confusion when the settings reset at the daily group change. I've now added these settings to the group directly and allow the settings on the user edit page to override the group settings. I refrained from fixing the can_download permission for now, because so many different things affect it and it will need at 3 separate permissions to control everything it does. Trying to fix it will take much more effort than what can be fixed today. Because of this, I removed the setting from the user edit page to reduce confusion from staff who don't realize it is controlled by the scheduler. Relevant issue: #1820.
2024-07-26 22:35:45 +00:00
Roardom
12903f64ac fix: strict type issues
Don't pass null into functions that don't accept null.
2024-05-23 17:40:16 +00:00
Roardom
2e57262e97 fix: strict types phpstan errors 2024-05-23 15:38:35 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
Roardom
7a71cc7935 refactor: simplify echo/audible creation logic
Refactor the code to be more idiomatic code.
2024-05-01 08:26:09 +00:00
Roardom
d59ef3ba8d remove: unused action from chat controller 2024-05-01 05:48:59 +00:00
Roardom
837441d34e refactor: simplify chatroom get echoes/audibles exist condition 2024-05-01 05:48:59 +00:00
Roardom
d32ae88e86 remove: casino/trivia/bet bots
These bots don't currently do anything. Exception: the casino bot accepts donations through a nerdbot command but doesn't currently do anything else with it. If any trivia/casino/bet features need to be brought back, it would be easy enough to view the old code through the git history, but there's probably a bunch that can be improved with its interface as well.
2024-04-30 07:41:27 +00:00
HDVinnie
ed7f17720a update: ChatController 2024-02-23 20:54:26 -05:00
HDVinnie
3f03214e39 PHP Style Change (Laravel Pint CI) 2023-11-07 23:54:38 +00:00
HDVinnie
b3f0386149 cleanup: pt.1 2023-10-12 22:30:52 -04:00
Roardom
13f0b35625 fix: chatbox 2023-09-07 08:04:55 +00:00
Roardom
df1289d4cd update: retrieve user by request rather than authFactory 2023-08-30 09:37:42 +00:00
Roardom
9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom
738bc7f2d1 refactor: single line delete queries 2023-07-07 00:26:17 +00:00
HDVinnie
5232781f03 Merge pull request #2840 from Roardom/code-cleanup-3
(Refactor) Code Cleanup
2023-06-19 20:14:57 -04:00
Roardom
177c59d88d refactor: swap firstOrFail() for sole() to enforce a single result 2023-06-19 23:18:40 +00:00
Roardom
b5493c5642 refactor: swap where('id', '=', ) for find() 2023-06-19 23:18:40 +00:00
HDVinnie
d3f3510011 remove: unused foreach keys 2023-06-19 10:18:48 -04:00
HDVinnie
3650900c97 update: lint
- not_operator_with_space to false
2023-02-03 16:01:29 -05:00
HDVinnie
472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00
StyleCI Bot
e292545306 Apply fixes from StyleCI 2022-05-31 22:06:07 +00:00
Shift
be2d37ed6e Use Illuminate\Support\Carbon 2022-05-31 22:05:34 +00:00
HDVinnie
594b7864d9 refactor: adopt new helpers in laravel 9 2022-03-06 17:20:05 -05:00
HDVinnie
bdd63aa816 update: controllers 2022-02-28 05:06:55 -05:00
HDVinnie
d7cb337f5f chore: streamline query builder orderBy calls with asc and desc arguments 2022-01-08 03:34:17 -05:00
HDVinnie
77ec35bea5 chore: apply the laravel code style linter 2022-01-08 00:03:12 -05:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
2a53cea216 refactor: newline after statement 2021-09-28 12:49:46 -04:00
HDVinnie
3407075214 refactor: better php8 usage
- Change simple property init and assign to constructor promotion
- Remove unused variable in catch()
- Change docs types to union types, where possible
2021-05-15 22:41:28 -04:00
HDVinnie
8a9d94e07a update: preslash simple functions
- performance
2020-12-31 12:41:46 -05:00
HDVinnie
90b3880dab update: strpos and substr functions
- strpos and substr functions calls that can be replaced with the str_* functions calls (introduced in PHP 8.0).
2020-12-30 22:55:44 -05:00
HDVinnie
18f299157e refactor: api chat controller 2020-12-30 01:20:40 -05:00
HDVinnie
2476770b10 cleanup: api chat controller 2020-12-28 23:11:30 -05:00
HDVinnie
de86488112 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-12-18 05:20:06 +00:00
HDVinnie
f0cac4a7d9 fix: api chat controller 2020-12-18 00:02:07 -05:00
HDVinnie
467d31f10a refactor: constructor promotions 2020-12-17 23:25:50 -05:00
HDVinnie
8efb7b4c58 update: api chat controller
- condition that are already covered by earlier condition and thus has no effect
2020-12-03 00:09:14 -05:00
HDVinnie
f70452da1a refactor: 'substr(...)' replaced with 'strpos(...)'
- 'substr(...)' invokes additional memory allocation (more work for GC), which is not needed in the context. 'strpos(...)' will do the same job with CPU resources only.
2020-12-02 21:07:17 -05:00
HDVinnie
99fd793d3d refactor: rename param to match type 2020-09-04 13:33:20 -04:00
HDVinnie
0733269867 update: phpdoc blocks 2020-07-22 16:57:13 -04:00
HDVinnie
a975116218 refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30%
-  @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
2020-07-22 15:09:37 -04:00
HDVinnie
e7ccde0190 refactor: rename property to match type 2020-07-22 14:50:41 -04:00