Commit Graph

31 Commits (e1df7d657c33bb3b814c31d48d1dd990d71fda57)

Author SHA1 Message Date
Daniel Supernault 9c81a75ad3
Refactor Direct Messages, add Group Chat support and proper context threading with Mastodon 2 days ago
Your Name 1379ae4019 Larastan 5 days ago
Your Name 5949dc21c1 UseIdenticalOverEqualWithSameTypeRector 6 days ago
Your Name 0d999f5dda added return type to function 6 days ago
Your Name e3b6cebf27 Fix MariaDB driver detection and reblog caption null inserts
Laravel 11 exposes MariaDB as a dedicated 'mariadb' driver, so
config('database.default') === 'mysql' checks silently misclassified
MariaDB as the non-mysql (postgres) branch.

- Add App\Util\Database\DatabaseDriver with isMysqlLike()/isPgsql()
  plus db_is_mysql_like()/db_is_pgsql() global helpers.
- Route all database.default driver checks through the helpers so
  MySQL and MariaDB are treated as one group.
- Use '' (not null) for share/compose caption+rendered, valid whether
  the column is nullable or NOT NULL (it is NOT NULL on MySQL/MariaDB).
- Guard pgsql strtolower() in registration against missing fields.
- Scope CustomEmoji::duplicateShortcodes to the grouped column for
  Postgres GROUP BY validity.
- Remove stale Postgres guard in status:dedup; use havingRaw for
  cross-driver HAVING.
1 week ago
Your Name 62d3bc8406 Stop swallowing overlay ValidationException into a generic 500
publishNext() throws ValidationException::withMessages() for invalid
story overlays (bad text/hashtag/mention/url/type), but the enclosing
catch (\Exception $e) caught it too, since ValidationException extends
Exception. Clients got a generic 500 "Failed to create story" instead
of the intended 422 with field-level errors, and the log was flooded
with ordinary user-input validation failures logged as server errors.
Catch ValidationException separately, roll back, and rethrow it so
Laravel's exception handler renders the normal 422 response.
2 weeks ago
Shlee fc80bce460
Update StoryApiV1Controller.php 2 weeks ago
Your Name 9850aac676 Invalidate latest-story cache on remote story expiry and null-guard latest() 2 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name 54cfdf3c2b refactor: add return type declarations to controller methods
Adds explicit return type declarations to 498 controller methods
across 88 files. Types inferred from return statements:

- JsonResponse for response()->json() returns
- RedirectResponse for redirect()/back() returns
- View (contract) for view() returns
- Response for response() returns
- void for methods with no return value
- array for array returns
- string/int/bool for scalar returns

Also fixes 3 methods with incorrect bare returns:
- AvatarController::deleteAvatar - bare return → json response
- ImportPostController::checkPermissions - bare return → true
- RemoteAuthController::accountToId - bare return → empty array
4 weeks ago
Your Name 7c964f3b4f fix: replace backslash-prefixed facade calls with imported references
Replace \Cache::, \Log::, \DB:: calls with their imported facade
equivalents. The backslash-prefix relies on global aliases which
PHPStan cannot resolve, causing class.notFound errors.
4 weeks ago
Your Name e7ba43e2e1 fix: add missing use imports to resolve phpstan class.notFound errors
Add missing imports for Log, Cache, DB, FollowerService, StatusService,
LikeService, ReblogService, UserFilterService, AdminProfile, OauthClient,
and fix StatusTimelineTransformer reference (class didn't exist, replaced
with StatusTransformer).
4 weeks ago
Your Name 98267eb26f refactor: replace deprecated str_random() with Str::random()
str_random() is a deprecated helper from laravel/helpers that was
missed in the initial helpers removal. Replace all 18 call sites
with the modern Str::random() equivalent.
4 weeks ago
Shift 19880c2ffb
Convert string references to `::class`
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
4 weeks ago
Daniel Supernault 5f397f9135
Update StoryController 1 month ago
Shlee 8ce4b5d409
Update StoryApiV1Controller.php 1 month ago
Your Name 1a1dc5e096 fix typo 8 months ago
Daniel Supernault f195102b34
Update StoryApiV1Controller, reduce min story size to 10kb 1 year ago
Daniel Supernault 5d4674daa4
Update ApiV1StoryController, fix viewer pagination
Fix cursor pagination
1 year ago
Daniel Supernault 32b1f26d69
Update StoryApiV1Controller, update error messsage 1 year ago
Daniel Supernault 8fb44e3162
Update StoryApiV1Controller, improve text overlay validation regex for improved support 1 year ago
Daniel Supernault 76d9ded694
Update StoryApiV1Controller, add missing validation rule 1 year ago
Daniel Supernault 97badbbdd6
Update StoryApiV1Controller, add new v1.2 endpoints 1 year ago
Daniel Supernault ab9c13fe0d
New supported formats, Preserve ICC Color Profiles, libvips support
Update image pipeline to handle avif, heic and webp and preserve ICC color profiles and added libvips support.
1 year ago
Daniel Supernault 9eeb7b6741
Update Status caption logic, stop storing duplicate html caption in db and defer to cached StatusService rendering 2 years ago
Daniel Supernault d1adb109de
Update stories config, use config_cache 3 years ago
Daniel Supernault bcb88d5b0a
Update StoryApiV1Controller, add self-carousel endpoint. Fixes #4352 3 years ago
Daniel Supernault 941736ce6c
Update StoryApiV1Controller, add viewers route to view story viewers 3 years ago
Daniel Supernault 6cdb5bc672
Update Notification logic, remove message and rendered fields 3 years ago
Daniel Supernault 22da2647c7
Update filesystems, store all files as public by default and add default permissions. Fixes #4273, #4275. Closes #3825 4 years ago
Daniel Supernault 855e9626a5
Update Story v1.1 api endpoints 4 years ago