mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-11-16 14:29:09 +01:00
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.
This commit is contained in:
1 parent
348cce6d5d
commit
71af3a9342
1 file changed
+2
-1
@@ -103,7 +103,8 @@ data:
|
|||||||
UPDATE notification SET "deletedAt" = now()
|
UPDATE notification SET "deletedAt" = now()
|
||||||
WHERE type = 'AlbumInvite' AND "deletedAt" IS NULL AND "readAt" IS NULL
|
WHERE type = 'AlbumInvite' AND "deletedAt" IS NULL AND "readAt" IS NULL
|
||||||
AND description LIKE :'sender' || ' shared an album%'
|
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,
|
sender=group_name,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user