From 89ded7b46cd15dec8de57285b02375d3889d7c46 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 13 May 2026 14:27:23 -0400 Subject: [PATCH] feat(#402): publish album/artist like events on the SSE bus #392 shipped track.liked / track.unliked but skipped the album + artist symmetric pairs. Closes that gap so the Flutter Liked tab's albums and artists sub-lists can listen for changes the same way the tracks sub-list will (#402 wire-up lands next commit). publishLikeEvent already handles the entity_type dispatch; the four handler call sites just need the new lines. For #402 follow-up to #392. Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/api/likes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/api/likes.go b/internal/api/likes.go index 87ad477a..b36dfcd7 100644 --- a/internal/api/likes.go +++ b/internal/api/likes.go @@ -113,6 +113,7 @@ func (h *handlers) handleLikeAlbum(w http.ResponseWriter, r *http.Request) { return } h.logLikeChange(r, syncpkg.EntityLikeAlbum, user.ID, id, syncpkg.OpUpsert) + h.publishLikeEvent(user.ID, id, "album", true) w.WriteHeader(http.StatusNoContent) } @@ -131,6 +132,7 @@ func (h *handlers) handleUnlikeAlbum(w http.ResponseWriter, r *http.Request) { return } h.logLikeChange(r, syncpkg.EntityLikeAlbum, user.ID, id, syncpkg.OpDelete) + h.publishLikeEvent(user.ID, id, "album", false) w.WriteHeader(http.StatusNoContent) } @@ -159,6 +161,7 @@ func (h *handlers) handleLikeArtist(w http.ResponseWriter, r *http.Request) { return } h.logLikeChange(r, syncpkg.EntityLikeArtist, user.ID, id, syncpkg.OpUpsert) + h.publishLikeEvent(user.ID, id, "artist", true) w.WriteHeader(http.StatusNoContent) } @@ -177,6 +180,7 @@ func (h *handlers) handleUnlikeArtist(w http.ResponseWriter, r *http.Request) { return } h.logLikeChange(r, syncpkg.EntityLikeArtist, user.ID, id, syncpkg.OpDelete) + h.publishLikeEvent(user.ID, id, "artist", false) w.WriteHeader(http.StatusNoContent) }