Open dylanjeffers opened 1 day ago
Latest commit: 9d21f0706372893982ac1ba736f36d76a4668151
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Description
Fixes issue where pinning a new comment wasn't unpinning the existing comment. This is done by refactoring how pinned comments are modeled, by removing "is_pinned" on individual comments, and instead adding "pinned_comment_id" to teh track. In a lot of ways this makes more sense: it's more similar to how artist_pick works, it prevents track owner from modifying someone else's comment data, and avoids a ton of pitfalls and subtle bugs managing pinned comments in entity_manager.
One slightly awkward aspect of this is that we have to pass the track_id, ie entity_id as metadata through. This is actually nice though because now we can validate that the user attempting to pin the comment is the actual owner of the track, which solves an outstanding bug.