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

Implement "Show 'typing...' status" in Chat Rooms #20

Closed
iammuho opened this issue Aug 30, 2023 · 1 comment
Closed

Implement "Show 'typing...' status" in Chat Rooms #20

iammuho opened this issue Aug 30, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@iammuho
Copy link
Owner

iammuho commented Aug 30, 2023

Implement a real-time update system to notify all users in a chat room when someone starts or stops typing. The feature will be implemented using a POST API endpoint and WebSocket notifications.

Requirements:

  • API Endpoint: Create a new POST API endpoint /room/:roomID/event for the typing event. This endpoint will accept an eventType to indicate whether typing has started or stopped.

Sample API Contract:

POST /room/:roomID/event { "eventType": "typing.started" }

  • Event Types: Two event types should be supported:

EventTypeTypingStart ("typing.started"): User has started typing.
EventTypeTypingStop ("typing.stopped"): User has stopped typing.

  • WebSocket Notification: Once the server receives the API request, it should broadcast this event to all users in the room using WebSockets.
  • Rate Limiting: Implement rate limiting for this feature to avoid unnecessary network calls. For example, limit the number of "typing started" and "typing stopped" events per user per second.

Success Criteria:

  • Users in the same room should see real-time updates when someone starts or stops typing.
  • The feature should be resilient and optimized, adhering to best practices.
@iammuho iammuho added enhancement New feature or request good first issue Good for newcomers labels Aug 30, 2023
@iammuho
Copy link
Owner Author

iammuho commented Aug 31, 2023

PR is created, waiting for some review: #28

@iammuho iammuho closed this as completed Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant