v3: added content slugs, fixed real-time updates in client, added @mentions across the app, added new file selector and drop zone
This commit is contained in:
@@ -117,7 +117,11 @@ export function broadcastPlaylistCreated(playlist: Playlist): void {
|
||||
}
|
||||
|
||||
export function broadcastPlaylistUpdated(playlist: Playlist): void {
|
||||
sendToPlaylistAudience(playlist, { type: "playlist_updated", playlist });
|
||||
// Broadcast to ALL clients so non-owners can react to visibility changes
|
||||
// (e.g. remove a now-private playlist from their feed).
|
||||
for (const client of clients) {
|
||||
send(client.socket, { type: "playlist_updated", playlist });
|
||||
}
|
||||
}
|
||||
|
||||
export function broadcastPlaylistDeleted(
|
||||
@@ -158,6 +162,12 @@ export function broadcastCommentDeleted(
|
||||
}
|
||||
}
|
||||
|
||||
export function broadcastCommentUpdated(comment: Comment): void {
|
||||
for (const client of clients) {
|
||||
send(client.socket, { type: "comment_updated", comment });
|
||||
}
|
||||
}
|
||||
|
||||
// Keepalive: ping all clients every 30s, remove non-responsive ones
|
||||
const PING_INTERVAL = 30_000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user