-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Freshchat - add props to send-message-in-chat #18742
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds new parameters to the Freshchat "Send Message in Chat" action to support agent-sent and private messages, introduces runtime validation for agent usage, adjusts payload construction based on actor type, includes message_type, and bumps component and action versions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Caller
participant Act as SendMessageInChat Action
participant FC as Freshchat API
Dev->>Act: Invoke with { actorType, agentId?, userId, messageType }
rect rgb(245,245,255)
note over Act: Validate inputs
Act->>Act: if actorType=="agent" and no agentId<br/>throw ConfigurationError
end
alt Valid
Act->>Act: Build payload<br/>actor_id = agentId|userId<br/>user_id = undefined|userId<br/>message_type = messageType
Act->>FC: POST /messages (payload)
FC-->>Act: Response
Act-->>Dev: Result
else Invalid (missing agentId)
Act-->>Dev: Error (ConfigurationError)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927, LGTM! Ready for QA!
Resolves #18639
Summary by CodeRabbit
New Features
Chores