Add chat message API endpoints for operators and guests
Cancelled
Subtask
High
Description
## Task
Add controller endpoints for sending and retrieving chat messages in support sessions.
## Endpoints
### For Operators (authenticated)
```ruby
# POST /remote_support/sessions/:id/messages
# Body: { content: "message text" }
# Returns: { id, content, participant_type, participant_name, created_at }
```
### For Guests (token-authenticated)
```ruby
# POST /support/guest/:token/messages
# Body: { content: "message text", guest_name: "optional name" }
# Returns: { id, content, participant_type, participant_name, created_at }
```
### Message History
```ruby
# GET /remote_support/sessions/:id/messages
# Returns: [{ id, content, participant_type, participant_name, created_at }, ...]
# For operators: requires authentication
# Accessible even after session ends (for review)
```
### Guest Message History
```ruby
# GET /support/guest/:token/messages
# Returns message history for active sessions only
```
## Controller Structure
- Add methods to `RemoteSupportSessionsController` for operator endpoints
- Add methods to `RemoteSupportGuestController` for guest endpoints
## Files to Modify
- `app/controllers/remote_support_sessions_controller.rb`
- `app/controllers/remote_support_guest_controller.rb`
- `config/routes.rb`
- `spec/requests/remote_support_sessions_chat_spec.rb`
- `spec/requests/remote_support_guest_chat_spec.rb`
Working Memory
{
"blocked_reason": "Waiting for dependencies: 103"
}
Ticket Stats
Status:
Cancelled
Priority:
High
Type:
Subtask
Comments
0 commentsAdd a Comment
No Subtasks Yet
Break down this ticket into smaller, manageable subtasks