Commit Graph

10 Commits

Author SHA1 Message Date
David Bruno Vontor
b1f88ca501 Restore reactions, add constraint, handle errors
Restore soft-deleted message reactions and enforce uniqueness only for active reactions; add WebSocket error handling and minor UI/Docker tweaks.

- backend/social/chat/models.py: Toggle reaction now restores a stale soft-deleted MessageReaction (avoids unique conflicts) and creates new reactions as needed. Replaced unique_together with a conditional UniqueConstraint that applies only to non-deleted records.
- backend/social/chat/consumers.py: Wrap reaction toggle in try/except to return a WS error message on failure instead of allowing exceptions to bubble up.
- frontend/src/components/social/chat/Message.tsx: Adjusted Tailwind max-width class for the reaction menu (max-w-32).
- docker-compose.yml: Added commented example configuration for an optional Janus media server (documentational/commented service).

These changes prevent unique constraint errors when restoring reactions, improve robustness of the WebSocket reaction flow, and include small UI and deployment notes.
2026-06-04 16:45:16 +02:00
3859659b13 Add emoji picker, reactions user_id & UI tweaks
Introduce client-side emoji picker and richer reaction UX, and propagate user IDs for reactions over the WS protocol. Backend: include user_id in reaction events. Frontend: add EmojiPicker component; update useChatSocket types to include user_id; handle "reaction" events in ChatRoomPage to update cached messages (add/remove/switch reactions). Message component: UI overhaul — action menu with slide-out actions, toggle button (⋮→✕), emoji picker trigger, grouped reaction buttons that show counts and indicate "mine" state, and various layout/cleanups. Media: defer video loading by setting preload="none" in ChatMediaGallery, MediaGallery and PostComposer to improve performance.
2026-06-04 00:14:34 +02:00
David Bruno Vontor
bb09f0ccd3 updated chat andlayout 2026-06-03 17:07:34 +02:00
David Bruno Vontor
8269d044a2 chat ws with pfp is working 2026-05-28 17:23:04 +02:00
d52af2c495 chat implemented, testing needed 2026-05-20 00:52:56 +02:00
202ce22102 added frontend for social + feed partiali working 2026-05-18 02:25:47 +02:00
659999f4fd gukgjzkgjhgjh 2026-04-20 00:04:15 +02:00
f7605812c1 Implement chat backend and frontend scaffolding
Expanded chat backend with message reply, edit, delete, and reaction support in consumers and models. Updated routing to use chat_id. Added chat-related view stubs. On the frontend, introduced ChatLayout and ChatPage scaffolding, and routed protected routes through ChatLayout.
2025-12-26 17:39:11 +01:00
deb853b564 Add chat models and scaffold pages/posts apps
Implemented comprehensive models for chat functionality, including Chat, Message, MessageHistory, MessageReaction, and MessageFile. Updated ChatConsumer to enforce authentication and improve message handling. Added initial scaffolding for 'pages' and 'posts' Django apps with basic files.
2025-12-26 04:48:39 +01:00
David Bruno Vontor
4791bbc92c websockets + chat app (django) 2025-10-31 13:32:39 +01:00