Skip to content

Commit

Permalink
[PLAT-847]: Fix user subscription create album notification copy (#3162)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-kiam authored Apr 7, 2023
1 parent 7da3e10 commit 0e44281
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/common/src/services/audius-backend/AudiusBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2277,11 +2277,14 @@ export const audiusBackend = ({
const data = action.data
if ('playlist_id' in data) {
entityType = data.is_album ? Entity.Album : Entity.Playlist
return decodeHashId(data.playlist_id)
return data.playlist_id.map((playlist_id) =>
decodeHashId(playlist_id)
)
}
entityType = Entity.Track
return decodeHashId(data.track_id)
})
.flat()
.filter(removeNullable)
const userId = decodeHashId(notification.actions[0].specifier) as number
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/store/notifications/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export type DiscoveryCreateTrackNotificationAction = {
}
export type DiscoveryCreatePlaylistNotificationAction = {
is_album: boolean
playlist_id: string
playlist_id: string[]
}

export type TrendingRange = 'week' | 'month' | 'year'
Expand Down

0 comments on commit 0e44281

Please sign in to comment.