fix(server): hide isFavorite from album asset sync stream (#28923)

* fix(server): hide isFavorite from album asset sync stream

* some tests

* Revert "some tests"

This reverts commit 3242e6961c.

* alter existing test to clear test's intent

* Reapply "some tests"

This reverts commit f1d4c47f5f.

* drop one

* sql
This commit is contained in:
Timon 2026-06-09 06:03:03 +02:00 committed by GitHub
parent b846afeb08
commit d10153bbc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 121 additions and 33 deletions

View file

@ -69,7 +69,6 @@ select
"asset"."localDateTime",
"asset"."type",
"asset"."deletedAt",
"asset"."isFavorite",
"asset"."visibility",
"asset"."duration",
"asset"."livePhotoVideoId",
@ -78,15 +77,19 @@ select
"asset"."width",
"asset"."height",
"asset"."isEdited",
case
when "asset"."ownerId" = $1 then "asset"."isFavorite"
else $2
end as "isFavorite",
"album_asset"."updateId"
from
"album_asset" as "album_asset"
inner join "asset" on "asset"."id" = "album_asset"."assetId"
where
"album_asset"."updateId" < $1
and "album_asset"."updateId" <= $2
and "album_asset"."updateId" >= $3
and "album_asset"."albumId" = $4
"album_asset"."updateId" < $3
and "album_asset"."updateId" <= $4
and "album_asset"."updateId" >= $5
and "album_asset"."albumId" = $6
order by
"album_asset"."updateId" asc
@ -103,7 +106,6 @@ select
"asset"."localDateTime",
"asset"."type",
"asset"."deletedAt",
"asset"."isFavorite",
"asset"."visibility",
"asset"."duration",
"asset"."livePhotoVideoId",
@ -112,16 +114,20 @@ select
"asset"."width",
"asset"."height",
"asset"."isEdited",
case
when "asset"."ownerId" = $1 then "asset"."isFavorite"
else $2
end as "isFavorite",
"asset"."updateId"
from
"asset" as "asset"
inner join "album_asset" on "album_asset"."assetId" = "asset"."id"
inner join "album_user" on "album_user"."albumId" = "album_asset"."albumId"
where
"asset"."updateId" < $1
and "asset"."updateId" > $2
and "album_asset"."updateId" <= $3
and "album_user"."userId" = $4
"asset"."updateId" < $3
and "asset"."updateId" > $4
and "album_asset"."updateId" <= $5
and "album_user"."userId" = $6
order by
"asset"."updateId" asc
@ -139,7 +145,6 @@ select
"asset"."localDateTime",
"asset"."type",
"asset"."deletedAt",
"asset"."isFavorite",
"asset"."visibility",
"asset"."duration",
"asset"."livePhotoVideoId",
@ -147,15 +152,19 @@ select
"asset"."libraryId",
"asset"."width",
"asset"."height",
"asset"."isEdited"
"asset"."isEdited",
case
when "asset"."ownerId" = $1 then "asset"."isFavorite"
else $2
end as "isFavorite"
from
"album_asset" as "album_asset"
inner join "asset" on "asset"."id" = "album_asset"."assetId"
inner join "album_user" on "album_user"."albumId" = "album_asset"."albumId"
where
"album_asset"."updateId" < $1
and "album_asset"."updateId" > $2
and "album_user"."userId" = $3
"album_asset"."updateId" < $3
and "album_asset"."updateId" > $4
and "album_user"."userId" = $5
order by
"album_asset"."updateId" asc