Skip to content

feat: Implement online/offline status indicators#81

Open
shriyashaThakur wants to merge 1 commit intopiyush-eon:masterfrom
shriyashaThakur:issue-fixes-3
Open

feat: Implement online/offline status indicators#81
shriyashaThakur wants to merge 1 commit intopiyush-eon:masterfrom
shriyashaThakur:issue-fixes-3

Conversation

@shriyashaThakur
Copy link

This PR adds real-time online/offline status tracking to the chat application.

Updates include:

  • Server-side tracking of connected users using Socket.io.
  • Broadcasting onlineUsers to all clients on connection and disconnection.
  • Integration of onlineUsers array into ChatProvider for global state access.
  • Display of online/offline indicators using AvatarBadge in chat lists and search results.
  • Added a status dot in the SingleChat header for one-on-one chats.
  • Fixed relative import path in UserListItem.

Notes:
Enhances real-time awareness of user presence, improving overall chat interactivity.

- Adds server-side logic (socket.io) to track connected users in a Set.
- Broadcasts the onlineUsers list to all clients on 'setup' and 'disconnect' events.
- Adds onlineUsers array to ChatProvider global state.
- Displays an AvatarBadge in UserListItem to show status in chat lists and search results.
- Adds a status dot in the SingleChat header for 1-on-1 chats.
- Fixes relative import path in UserListItem.
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.

1 participant