Commit Graph

13124 Commits (ef7e485e7d9109bdc0b5d4966b09da38c57faf38)
 

Author SHA1 Message Date
Your Name ef7e485e7d Fix Larastan error: correct Status import in NotificationService
Use App\Models\Status instead of the non-existent App\Status class.
3 weeks ago
Shlee 003953eb3e
Merge pull request #7045 from pixelfed/perf/follower-service-following-ids
Deduplocation: add FollowerService::getFollowingIds for common function
3 weeks ago
Daniel Supernault c9b0ee3bdd
Refactor NotificationService 3 weeks ago
Shlee 9c7c33969a
Merge pull request #7044 from pixelfed/perf/delete-jobs-streaming
Stream deletions with cursor and batch notification lookups in delete jobs
3 weeks ago
Your Name 667f6e2fc9 Extract following-ids lookup into FollowerService::getFollowingIds
The Cache::remember('profile:following:'.$pid, ...) block that plucks
following_id and appends the caller's own id was copy-pasted across four
call sites, with inconsistent TTLs (1440 minutes vs 1209600 seconds).

Add FollowerService::getFollowingIds($pid), which owns the cache key that
add()/remove() already invalidate, and use it from InternalApiController,
PublicApiController, ApiV1Controller and HashtagUnfollowPipeline. Removes
the now-unused Follower/Cache imports left behind.

Adds a test covering the followed-ids-plus-self result and the
follows-nobody case.
3 weeks ago
Shlee ed07f9bfec
Merge pull request #7042 from pixelfed/chore/remove-dead-debug-methods
Remove dead debug methods that echoed the raw request
3 weeks ago
Your Name c4e5b96d25 Stream deletions with cursor and batch notification lookups in delete jobs
The status- and account-deletion jobs loaded whole collections with
->get() and then looped, running a per-row Notification lookup inside
each iteration.

- StatusDelete / RemoteStatusDelete: resolve associated DirectMessage and
  MediaTag ids, fetch their notifications in a single whereIn query,
  clear each via cursor (NotificationService::del must run per row for
  cache/redis cleanup), then bulk delete the DMs and media tags.
- DeleteAccountPipeline / DeleteRemoteProfilePipeline: stream Story and
  Collection deletions with cursor() instead of loading every row into
  memory. Per-row file unlink and item deletes are preserved.

Adds StatusDeleteCleanupTest covering DM + notification cleanup, media
tag + notification cleanup, and the no-associations case.
3 weeks ago
Your Name 661b841428 Remove dead debug methods that echoed the raw request
CollectionController::index and StoryComposeController::createPoll had no
route mapping and simply returned $request->all(). Both are unreachable
debug leftovers; remove them. The live poll route maps to
ComposeController::createPoll, which is unaffected.
3 weeks ago
Shlee bd6dfcc28e
Merge pull request #7039 from pixelfed/refactor/dedupe-query-patterns
Extract duplicated blocked-id and duplicate-shortcode query patterns
3 weeks ago
Your Name e4e12fad7c Extract duplicated blocked-id and duplicate-shortcode query patterns
Two query patterns were copy-pasted across several call sites:

- The 'users who blocked me, plus myself' list used to filter profile
  search (UserFilter::whereFilterableId($pid)->pluck('user_id')->push($pid))
  appeared in ComposeController (x2) and DirectMessageController. Extracted
  to UserFilterService::searchExcludedProfileIds(). Note this is the
  inverse of blocks() (who I blocked), so it is a distinct method.

- CustomEmoji duplicate detection (groupBy('shortcode')->havingRaw(
  'count(*) > 1')) appeared three times in AdminController. Extracted to a
  CustomEmoji::duplicateShortcodes() query scope.

Adds tests for both. No behaviour change.
3 weeks ago
Shlee 7ad550d2f7
Merge pull request #7037 from pixelfed/perf/seasonal-sql-aggregation
Compute Year-in-Review averages in SQL instead of in PHP
3 weeks ago
Your Name cd873c8976 Compute Year-in-Review averages in SQL instead of in PHP
SeasonalController::getData computed the average posts/likes per profile
by grouping in SQL, then pulling every grouped row into a collection and
calling ->pluck('count')->avg() in PHP. This loaded one row per profile
into memory just to average.

Wrap the grouped per-profile counts in a subquery and let the database
compute AVG(count), returning a single value. Also drops the invalid
SELECT * with GROUP BY (ONLY_FULL_GROUP_BY) by selecting count(*) only.

Adds a test verifying the average-of-per-profile-counts and its
exclusions (remote, wrong type, out-of-range date), plus the empty case.
3 weeks ago
Shlee 660880eac7
Merge pull request #7036 from pixelfed/fix/remote-auth-http-timeout
Add timeout, retry and error handling to remote auth HTTP calls
3 weeks ago
Your Name 2ad6e28318 Add timeout, retry and error handling to remote auth HTTP calls
RemoteAuthService::getVerifyCredentials, getFollowing and getToken made
outbound HTTP requests to a user-controlled remote instance during the
Mastodon login flow with no timeout, no retry and no exception handling.
A slow or hostile instance could hang the request or surface an uncaught
exception.

Wrap all three in timeout(20)->retry(3, 750) with try/catch that returns
false on failure, matching the existing pattern in isDomainCompatible().
Callers already treat a falsy return as a failure; add the missing guard
at the one verify_credentials call site that accessed the result array
without checking it first.

Adds RemoteAuthServiceTest covering connection failure, server error and
success paths.
3 weeks ago
Shlee 46580f3635
Merge pull request #7035 from pixelfed/fix/dm-read-bulk-update
Mark direct messages read with a single bulk update
3 weeks ago
Your Name fbfd26d775 Mark direct messages read with a single bulk update
DirectMessageController@read fetched every matching DirectMessage and
saved each one individually in a loop, issuing one UPDATE per row. On an
active thread this is N queries.

Pluck the matching ids and perform a single bulk update, preserving the
existing response (the list of affected message ids) and updated_at
behaviour.

Adds regression tests covering the marked-read ids, the status_id lower
bound, and sender isolation.
3 weeks ago
Shlee 7b7392dcaf
Merge pull request #7034 from pixelfed/fix/avatar-upload-silent-failure
Fix silent failure in avatar upload endpoints
3 weeks ago
Your Name 29280cd950 Fix silent failure in avatar upload endpoints
AvatarController@store and BaseApiController@avatarUpdate wrapped the
upload flow in an empty catch(\Exception) block and returned a success
response even when the upload or save failed.

Log the exception and return a real error response (500 JSON for the
API endpoint, a redirect with validation errors for the web endpoint).

Adds regression tests covering the failure path, the success path, and
non-image rejection.
3 weeks ago
Shlee 2486817b78
Merge pull request #7024 from pixelfed/dependabot/npm_and_yarn/staging/blurhash-2.0.5
chore(deps)(deps): bump blurhash from 1.1.5 to 2.0.5
3 weeks ago
Shlee b130ef2bf3
Merge pull request #7013 from pixelfed/dependabot/npm_and_yarn/ip-address-10.7.0
chore(deps): bump ip-address from 10.2.0 to 10.7.0
3 weeks ago
Shlee b8e04e2038
Merge pull request #7010 from pixelfed/dependabot/npm_and_yarn/multi-c845c5b3f5
chore(deps): bump postcss-selector-parser
3 weeks ago
dansup 7332e251cd
Merge pull request #7006 from darkdi/fix/groups-topic-pf-type
Drop the no-op pf_type assignment in the group topic feed
3 weeks ago
dependabot[bot] f428ff6fb5
chore(deps)(deps): bump blurhash from 1.1.5 to 2.0.5
Bumps [blurhash](https://github.com/woltapp/blurhash) from 1.1.5 to 2.0.5.
- [Commits](https://github.com/woltapp/blurhash/commits)

---
updated-dependencies:
- dependency-name: blurhash
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
Daniel Supernault 9e33bed630
Add only_reposts 3 weeks ago
Shlee 6fa09e4b42
Merge pull request #7014 from pixelfed/dependabot/npm_and_yarn/browserslist-4.28.8
chore(deps): bump browserslist from 4.28.2 to 4.28.8
3 weeks ago
Shlee be2f22bc2e
Merge pull request #7019 from pixelfed/dependabot/npm_and_yarn/fast-uri-3.1.6
chore(deps): bump fast-uri from 3.1.2 to 3.1.6
3 weeks ago
Shlee 1c1ea5bb17
Merge pull request #7016 from pixelfed/dependabot/composer/staging/laravel/telescope-5.23.0
chore(deps)(deps-dev): bump laravel/telescope from 5.22.1 to 5.23.0
3 weeks ago
Shlee 1a2be969b8
Merge pull request #7017 from pixelfed/dependabot/composer/staging/laravel/tinker-3.0.2
chore(deps)(deps): bump laravel/tinker from 2.11.1 to 3.0.2
3 weeks ago
Shlee 122f3bb485
Merge pull request #7020 from pixelfed/shleeable-patch-1
Shleeable patch 1
3 weeks ago
Shlee 93e8c7d868
Update dependabot.yml 3 weeks ago
dependabot[bot] 0eedf0deef
chore(deps): bump fast-uri from 3.1.2 to 3.1.6
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.6.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.6)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] 7eded54f1c
chore(deps)(deps): bump laravel/tinker from 2.11.1 to 3.0.2
Bumps [laravel/tinker](https://github.com/laravel/tinker) from 2.11.1 to 3.0.2.
- [Release notes](https://github.com/laravel/tinker/releases)
- [Changelog](https://github.com/laravel/tinker/blob/3.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/tinker/compare/v2.11.1...v3.0.2)

---
updated-dependencies:
- dependency-name: laravel/tinker
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] 447b76fede
chore(deps)(deps-dev): bump laravel/telescope from 5.22.1 to 5.23.0
Bumps [laravel/telescope](https://github.com/laravel/telescope) from 5.22.1 to 5.23.0.
- [Release notes](https://github.com/laravel/telescope/releases)
- [Changelog](https://github.com/laravel/telescope/blob/5.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/telescope/compare/v5.22.1...v5.23.0)

---
updated-dependencies:
- dependency-name: laravel/telescope
  dependency-version: 5.23.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] ec8fa5f619
chore(deps): bump browserslist from 4.28.2 to 4.28.8
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.28.2 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.28.2...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] 66f8b61ef7
chore(deps): bump ip-address from 10.2.0 to 10.7.0
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.2.0 to 10.7.0.
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](https://github.com/beaugunderson/ip-address/compare/v10.2.0...v10.7.0)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] e5bda87a10
chore(deps): bump postcss-selector-parser
Bumps  and [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser). These dependencies needed to be updated together.

Updates `postcss-selector-parser` from 7.1.1 to 7.1.5
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/v7.1.1...7.1.5)

Updates `postcss-selector-parser` from 6.1.2 to 6.1.4
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/v7.1.1...7.1.5)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 7.1.5
  dependency-type: indirect
- dependency-name: postcss-selector-parser
  dependency-version: 6.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dansup febbb23be2
Merge pull request #7004 from pixelfed/staging
Staging
3 weeks ago
Daniel Supernault 4c4a457fe4
Update ApiV1Controller, fix napi in timelines 3 weeks ago
Dmitry Rantovov 71cade540a Drop the no-op pf_type assignment in the group topic feed 3 weeks ago
Shlee 50cdff3bbe
Merge pull request #7005 from pixelfed/shleeable-patch-1
Shleeable patch 1
3 weeks ago
Shlee 07b5c1fd34
Update dependabot.yml 3 weeks ago
Shlee fbbdf884d2
Merge pull request #7003 from pixelfed/staging-snapshot-20260901
composer
3 weeks ago
Your Name 595620e5b8 composer 3 weeks ago
dansup 1a49fb5873
Merge pull request #7002 from pixelfed/staging
Fix reblog handling
3 weeks ago
Daniel Supernault a6117a2407
Fix reblog handling 3 weeks ago
dansup 926282e5b2
Merge pull request #7001 from pixelfed/staging
Update ASF
3 weeks ago
Daniel Supernault 5468eaeb56
Update ASF 3 weeks ago
dansup 76af4322c9
Merge pull request #6997 from pixelfed/staging
Staging
3 weeks ago
Daniel Supernault ccac8b31bd
Update Report endpoint, add support for optional message 3 weeks ago
Shlee 2f826759f8
Merge pull request #6996 from pixelfed/shleeable-patch-1
Update composer.json
3 weeks ago