Class: AssistantMessageNotifier
- Inherits:
-
ApplicationNotifier
- Object
- Noticed::Event
- ApplicationNotifier
- AssistantMessageNotifier
- Defined in:
- app/notifiers/assistant_message_notifier.rb
Overview
Notifies users when a new AI response is posted in a shared conversation.
Fired by AssistantChatWorker after the AI response is persisted.
Recipients are all parties with access to the conversation (owner +
directly shared parties + role-expanded parties) except the user who
sent the triggering message.
Delivery:
- DB: stores Noticed::Notification records for read tracking
- TurboStream: updates the conversation sidebar item in real time
for any user currently subscribed to "notifications:party_id"
Future delivery methods (email, SMS) can be added here with deliver_by.
Params:
conversation: AssistantConversation — the conversation that was updated
message_preview: String — truncated preview of the AI response (optional)