Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Epics
Create ActionCable channel for guest chat subscriptions
Edit
Create ActionCable channel for guest chat subscriptions
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
## Task Create an ActionCable channel that allows unauthenticated guests to subscribe to chat messages for their support session. ## Why ActionCable? - Guests have no NATS device/authentication - Need WebSocket for real-time without polling - ActionCable is already available in Rails stack - Can authenticate via session token in connection params ## Channel Design ```ruby # app/channels/support_session_chat_channel.rb class SupportSessionChatChannel < ApplicationCable::Channel def subscribed session = find_session_by_token(params[:token]) if session&.can_join? stream_from "support_session_chat:#{session.id}" @session = session else reject end end def unsubscribed stop_all_streams end def receive(data) # Handle incoming messages from WebSocket # Validate and save via SendChatMessageService end end ``` ## Connection Authentication Modify `ApplicationCable::Connection` to support token-based auth for guests (in addition to existing user auth). ## Broadcast Integration Update `SendChatMessageService` to broadcast via: ```ruby ActionCable.server.broadcast( "support_session_chat:#{session.id}", message.to_broadcast_payload ) ``` ## Files to Create/Modify - `app/channels/support_session_chat_channel.rb` - `app/channels/application_cable/connection.rb` (modify for guest tokens) - `spec/channels/support_session_chat_channel_spec.rb`
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel