Skip to content

feat: squad chat wall with real-time comments, emoji reactions, and A…#19

Open
awidearray wants to merge 336 commits intomainfrom
feat/squad-chat
Open

feat: squad chat wall with real-time comments, emoji reactions, and A…#19
awidearray wants to merge 336 commits intomainfrom
feat/squad-chat

Conversation

@awidearray
Copy link
Contributor

will need websocket set up by @daxdax89 for this feature to fully work

linux08 and others added 22 commits June 14, 2025 23:56
This reverts commit f43a7df.
…nd fix notification population in details tab
…ds-tab

fix: users squad now loads in squads/my page
@awidearray awidearray requested a review from Copilot June 15, 2025 22:18
@vercel
Copy link

vercel bot commented Jun 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
prod-one 🛑 Canceled (Inspect) Jul 2, 2025 9:47am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a squad chat wall feature that enables real-time messaging and emoji reactions via WebSockets and RabbitMQ. Key changes include:

  • Adding a new 'join' event and RabbitMQ consumer in the WebSocket server for squad messages.
  • Implementing new GET/POST and reactions API endpoints for squad messages.
  • Creating a new React component for the Squad Chat UI that handles message fetching, posting, and reaction toggling.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/websocketServer.js Added a 'join' event handler for room joining and a consumer for squad messages.
src/pages/api/squads/[squadId]/messages/index.ts Introduced GET/POST endpoints to fetch and create squad messages.
src/pages/api/squads/[squadId]/messages/[messageId]/reactions.ts Added a POST endpoint to toggle emoji reactions for messages.
src/models/SquadMessage.ts Defined the SquadMessage schema with a pre-save hook for the createdAtDay field.
src/components/squads/SquadChat.tsx Built the Squad Chat UI component with real-time updates and reaction handling.
src/app/squads/[squadId]/page.tsx Integrated the Squad Chat component within the squad details page.

export default function SquadChat({ squadId, currentUserWallet }: SquadChatProps) {
const [messages, setMessages] = useState<ChatMessage[]>([]);
const [input, setInput] = useState('');
const [charLeft, setCharLeft] = useState(140);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 140 here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants