-
Notifications
You must be signed in to change notification settings - Fork 386
feat(plugin-cc): added social channel support to sample app #4268
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
Conversation
📝 WalkthroughWalkthroughThe changes update internal logic in three functions— Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
yarn install v1.22.22 (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/samples/contact-center/app.js (2)
715-726: Fix inconsistent comparison operator for 'social' media type.The comparison operator for the 'social' media type uses
==while 'chat' and 'email' use the strict equality operator===. For consistency and to follow JavaScript best practices, use the same strict equality operator for all comparisons.- } else if (task.data.interaction.mediaType === 'chat' || task.data.interaction.mediaType === 'email' || task.data.interaction.mediaType == 'social') { + } else if (task.data.interaction.mediaType === 'chat' || task.data.interaction.mediaType === 'email' || task.data.interaction.mediaType === 'social') {
1527-1531: Fix inconsistent comparison operator for 'social' media type.Similar to the issue in the
updateCallControlUIfunction, the comparison operator for 'social' uses==while 'chat' uses===. Using strict equality consistently throughout the codebase is recommended.- if ((task.data.interaction.mediaType === 'chat' || task.data.interaction.mediaType == 'social') && isBundleLoaded && !task.data.wrapUpRequired) { + if ((task.data.interaction.mediaType === 'chat' || task.data.interaction.mediaType === 'social') && isBundleLoaded && !task.data.wrapUpRequired) {
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/samples/contact-center/app.js(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: AWS Amplify Console Web Preview
🔇 Additional comments (1)
docs/samples/contact-center/app.js (1)
1504-1508: Change looks good - social channel correctly handled alongside chat.The implementation correctly enables the answer button and disables the decline button for social tasks, matching the existing behavior for chat tasks.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
rarajes2
left a 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.
Minor changes. Please address them before merging the PR
COMPLETES #ADHOC
This pull request addresses
The missing social channel support in cc sdk samples
< DESCRIBE THE CONTEXT OF THE ISSUE >
currently CCSDK samples support chat and email as part of digital channels. We want to add facebook and other social channels as well.
by making the following changes
Added additional condition of 'social' to the existing 'chat' condition.
< DESCRIBE YOUR CHANGES >
https://app.vidcast.io/share/bd5e6119-7002-4162-b733-effa05bb27f3
Change Type
The following scenarios were tested
Initiate facebook chat from the facebook businesspage of sandbox and see the incoming task in sdk sample page.
Accept the task and see if the digital channels section loaded the facebookchat.
send and receive messages.
check task controls of chat visible or not. end the task and wrapup.(should work)
https://app.vidcast.io/share/bd5e6119-7002-4162-b733-effa05bb27f3
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
Make sure to have followed the contributing guidelines before submitting.