From 28bd3a550b2e8db5791b1e23f738500491f352e9 Mon Sep 17 00:00:00 2001 From: "immich-push-o-matic[bot]" <179150890+immich-push-o-matic[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 14:23:17 +0000 Subject: [PATCH] fix: include partner shared assets for people even without showInTimeline (#32226) fix: include partner shared assets for people even without showInTimeline (#32219) (cherry picked from commit 5fa7789e2672350c76b9b026f2b8c2bc3ffdf7c4) Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> --- server/src/services/person.service.spec.ts | 4 ++-- server/src/services/person.service.ts | 2 -- server/src/services/timeline.service.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/src/services/person.service.spec.ts b/server/src/services/person.service.spec.ts index 4584823d4..01319f81f 100644 --- a/server/src/services/person.service.spec.ts +++ b/server/src/services/person.service.spec.ts @@ -1491,7 +1491,7 @@ describe(PersonService.name, () => { expect(mocks.access.person.checkAccess).toHaveBeenCalledWith(auth.user.id, new Set(ids), PERSON_READ_ROLES); }); - it('should only include partners that are shown in the timeline', async () => { + it('should include all partners that are shown in the timeline', async () => { const auth = AuthFactory.create(); const person = PersonFactory.create(); const ids = [{ personGroupId: person.personGroupId, ownerId: auth.user.id }]; @@ -1507,7 +1507,7 @@ describe(PersonService.name, () => { await expect(sut.getStatistics(auth, person.personGroupId)).resolves.toEqual({ assets: 3 }); expect(mocks.person.getStatistics).toHaveBeenCalledWith(person.personGroupId, { ownerId: auth.user.id, - partnerIds: [inTimeline.id], + partnerIds: [inTimeline.id, notInTimeline.id], }); }); diff --git a/server/src/services/person.service.ts b/server/src/services/person.service.ts index 52908b6d2..4109b019b 100644 --- a/server/src/services/person.service.ts +++ b/server/src/services/person.service.ts @@ -80,7 +80,6 @@ export class PersonService extends BaseService { const partnerIds = await getMyPartnerIds({ userId: auth.user.id, repository: this.partnerRepository, - timelineEnabled: true, }); const { items, hasNextPage } = await this.personRepository.getAllForUser(pagination, auth.user.id, { withHidden, @@ -213,7 +212,6 @@ export class PersonService extends BaseService { const partnerIds = await getMyPartnerIds({ userId: auth.user.id, repository: this.partnerRepository, - timelineEnabled: true, }); return this.personRepository.getStatistics(personGroupId, { ownerId: auth.user.id, partnerIds }); } diff --git a/server/src/services/timeline.service.ts b/server/src/services/timeline.service.ts index 0fe5597c7..1be8080d2 100644 --- a/server/src/services/timeline.service.ts +++ b/server/src/services/timeline.service.ts @@ -35,7 +35,7 @@ export class TimelineService extends BaseService { const partnerIds = await getMyPartnerIds({ userId: auth.user.id, repository: this.partnerRepository, - timelineEnabled: true, + timelineEnabled: !options.personId || undefined, }); userIds.push(...partnerIds); }