From 71af3a9342a227b575cbf0b0b83a1558ba8f1c27 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sat, 24 Oct 2026 14:03:02 +0200 Subject: [PATCH] immich: fix hiding album invitations in share-sync immich stores a notification's data as a JSON string inside the jsonb column, so data->>'albumId' was always null and no invitation was hidden. Unwrap it first. --- immich/share-sync.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/immich/share-sync.yaml b/immich/share-sync.yaml index 7720def..68e7987 100644 --- a/immich/share-sync.yaml +++ b/immich/share-sync.yaml @@ -103,7 +103,8 @@ data: UPDATE notification SET "deletedAt" = now() WHERE type = 'AlbumInvite' AND "deletedAt" IS NULL AND "readAt" IS NULL AND description LIKE :'sender' || ' shared an album%' - AND (data->>'albumId')::uuid IN (SELECT id FROM album WHERE "createdAt" < now() - interval '7 days') + -- immich stores data as a JSON string inside the jsonb + AND ((data #>> '{}')::jsonb ->> 'albumId')::uuid IN (SELECT id FROM album WHERE "createdAt" < now() - interval '7 days') """, sender=group_name, )