Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/web socket #4

Merged
merged 3 commits into from
Aug 4, 2024
Merged

feat/web socket #4

merged 3 commits into from
Aug 4, 2024

Conversation

MikkyBoy357
Copy link
Owner

Describe your changes briefly

Web

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested using 2 or more accounts
  • I created tests for necessary files
  • I added videos and/or images if this PR changed the routes or app behavior in a way the user would notice

Describe your changes in detail

How to test

  1. WebSocket with authentication. Participants of a chat can connect to the WebSocket endpoint of that chat using their JWT token. Connected users can send messages and other Events.
    /ws/chats/[chatId] (WebSocket)
    https://github.com/user-attachments/assets/aa50a776-161d-4203-8143-a2f78afbc1fb

  2. When a user connects to the WebSocket endpoint, their onlineStatus changes to true and lastSeen is updated.
    When user disconnects from WebSocket endpoint or in case of an error, onlineStatus changes to false and lastSeen is updated.
    This happens low-key when user is connected /ws/chats/[chatId] (WebSocket)
    https://github.com/user-attachments/assets/b0031498-a2e8-44ba-916f-2a74e108e73b

@MikkyBoy357 MikkyBoy357 merged commit 05ee62c into dev Aug 4, 2024
1 check passed
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