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:
khannurien
2026-03-22 16:06:26 +00:00
parent 39a0cc397e
commit 34e908d1bc
42 changed files with 2170 additions and 628 deletions

View File

@@ -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;