Commit Graph
6 Commits
Author SHA1 Message Date
ancsemi 415ff761e4 v1.2.0: comprehensive bug hunt + voice UX + pinning + link previews + GIF search
Security fixes:
- Admin username hijack via rename (critical)
- XSS via unescaped quotes in _escapeHtml (critical)
- SSRF protection on /api/link-preview
- API key leak in get-server-settings to non-admins
- Cross-channel reaction removal without verification
- Voice signaling (offer/answer/ICE) without room membership check
- Typing indicator without channel membership check

Bug fixes:
- Voice audio: single MediaStreamSource splits to analyser + gain
- Talking indicator: 300ms hysteresis for smooth detection
- Screen share: SDP rollback, event.streams[0], track.onunmute
- GIF send broken: wrong property names silently dropped all GIFs
- Reconnect recovery: re-emit channel/state events on socket reconnect
- Screen share privacy: stopScreenShare() on viewer close
- Auto-scroll: force flag after message append
- Delete-user FK violation: clean up all related tables
- Delete-channel: remove associated pinned_messages
- Delete-message: remove associated pinned_messages
- LIKE wildcard injection in search-messages

Performance:
- N+1 query in get-messages replaced with 3 batch queries

Features (from prior uncommitted work):
- Voice join/leave audio cues, talking indicators
- Multi-stream screen sharing with tiled grid
- Message pinning (admin-only, 50/channel cap)
- Enhanced markdown: fenced code blocks, blockquotes
- Link previews with OG metadata + 30min cache
- Tenor GIF search with admin-configurable API key

Docs:
- README updated with new features, voice/screen share docs
- CHANGELOG v1.2.0 entry with full details
- Version bumped to 1.2.0
2026-02-11 20:33:29 -05:00
ancsemi 330e8f6f25 Fix voice audio, talking indicator, screen share, and GIF setup UX
Voice audio (Bug 2):
- Guard _playAudio against duplicate Web Audio graph creation
- Prevents multiple GainNodes competing for the same stream

Talking indicator (Bug 3):
- Already fixed: 300ms hysteresis hold timer in both local and remote
  talk detection (prevents flicker from micro-pauses between syllables)

Screen share (Bug 4):
- Add SDP rollback in voice-offer handler for renegotiation glare
- Guard voice-answer handler against stale answers after rollback
- Use event.streams[0] in ontrack for proper stream association
- Add track.onunmute to re-trigger screen display when data arrives
- Mute all screen share video tiles (prevents browser autoplay block)
- Explicit vid.play() call as autoplay backup

GIF search (Bug 1):
- Tenor API key can now be set from the admin GIF picker UI
- Stored in server_settings DB table (no .env editing needed)
- Server checks DB first, falls back to TENOR_API_KEY env var
- Shows step-by-step setup guide when key is missing
- Non-admins see a clear 'ask your admin' message
2026-02-11 19:40:19 -05:00
ancsemi 31644c4d39 Voice UX polish, message pinning, markdown, link previews
- Voice join/leave audio cues (ascending/descending synth tones)
- Talking indicator: username glows with accent pulse when speaking
- Multi-stream screen sharing: CSS Grid tile layout, per-user labels
- Fix remoteStream variable reference bug in voice.js _createPeer
- Message pinning (admin-only): pin/unpin with DB table, panel, 50-pin limit
- Enhanced markdown: fenced code blocks, blockquotes, improved inline code
- Link previews: server-side OG metadata fetch with 30-min cache, preview cards
- CSP updated for preview images
- .gitignore: exclude .vs/
2026-02-11 19:18:30 -05:00
ancsemi d34e165585 feat: Tenor GIF integration with search picker
- GIF button next to emoji picker opens search/browse panel
- Server-side proxy keeps Tenor API key hidden from clients
- Trending GIFs shown by default, live search with debounce
- Click a GIF to send it as an inline image in chat
- Tenor URLs auto-detected and rendered as inline images
- CSP updated to allow media.tenor.com images
- TENOR_API_KEY added to .env.example (optional, free)
- Full CSS theming for GIF picker panel
2026-02-11 17:24:02 -05:00
ancsemi 5a11a910b3 feat: move all user data to external directory (%APPDATA%\Haven or ~/.haven)
- Database, .env, certs, and uploads now stored outside the code directory
- Auto-migration moves existing data from old locations on first launch
- SSL certs auto-detected in data dir (no .env config needed)
- New src/paths.js module as single source of truth for all data paths
- HAVEN_DATA_DIR env var for custom data location override
- Updated Start Haven.bat, start.sh, README, GUIDE, .env.example
- Bumped version to 1.1.0
2026-02-11 16:52:46 -05:00
ancsemi b7b8b1bb86 v1.0.0 Haven public release 2026-02-11 00:15:56 -05:00