aboutsummaryrefslogtreecommitdiffstats
path: root/internal/notify/service.go
AgeCommit message (Collapse)AuthorFilesLines
28 hoursfeat(notify): materialise notification imagesDanilo M.1-3/+24
Notify resolves app_icon and image-path theme names, decodes image-data to a PNG under the image directory, and re-publishes the entry with its image path. The daemon advertises body-images, and removeImage refuses to touch a path outside its own directory so a client's screenshot file is never deleted.
28 hoursfix(notify): cover expiry cleanup and harden the image-removal guardDanilo M.1-3/+4
Split the dismiss test so expiry is exercised on its own: Expire removes the image without deleting the inert entry, and nothing asserted it. removeImage now requires filepath.Dir(filepath.Clean(path)) to equal the image directory, so a path carrying .. cannot reach a sibling daemon file such as queue.json. The previous prefix test accepted it. Not exploitable until Task 4 populates Popup.Image from a client hint, which is exactly why the guard is fixed now.
28 hoursfeat(notify): add the image field and its cleanupDanilo M.1-1/+15
Popup gains image, and the store calls an injected removeImage when an entry is dismissed, evicted, replaced or expired, so a daemon-written PNG does not outlive its balloon. The service decides what is daemon-owned; the store only names the path. NewStore now takes the callback as a third parameter, so the service wires its removeImage in (unlinking only under ImagesDir) and the existing call sites pass nil.
33 hoursfix: delete the timer entry on natural expiryDanilo M.1-2/+14
33 hoursfeat: add the D-Bus service and the daemonDanilo M.1-0/+134
Notify assigns an id and publishes; a replaces_id or stack tag reuses the id. CloseNotification closes with reason 3. The daemon claims org.freedesktop.Notifications and exits non-zero if it cannot, which is what happens while dunst still holds it.