We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Context:
The ChatController.prototype.sendEvent() validates that the specified content type is valid before invoking connectparticipant:SendEvent:
ChatController.prototype.sendEvent()
connectparticipant:SendEvent
amazon-connect-chatjs/src/core/chatController.js
Lines 128 to 131 in d85c517
amazon-connect-chatjs/src/core/chatArgsValidator.js
Lines 41 to 43 in d85c517
Lines 19 to 21 in d85c517
The same applies for ChatController.prototype.sendMessage():
ChatController.prototype.sendMessage()
Lines 96 to 99 in d85c517
Lines 12 to 17 in d85c517
The same would apply for ChatController.prototype.sendAttachment(), though it has not been added yet:
ChatController.prototype.sendAttachment()
Lines 107 to 110 in d85c517
Problem:
However, the CONTENT_TYPE enum is overly permissive. It has the allowed content types for:
CONTENT_TYPE
amazon-connect-chatjs/src/constants.js
Lines 68 to 101 in d85c517
This results in unnecessary invocations when a content type is invalid for the operation being invoked, but valid on either of the other two.
Proposed fix:
Make the validation stricter to only allow the content types of the invoked operation.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Context:
The
ChatController.prototype.sendEvent()
validates that the specified content type is valid before invokingconnectparticipant:SendEvent
:amazon-connect-chatjs/src/core/chatController.js
Lines 128 to 131 in d85c517
amazon-connect-chatjs/src/core/chatArgsValidator.js
Lines 41 to 43 in d85c517
amazon-connect-chatjs/src/core/chatArgsValidator.js
Lines 19 to 21 in d85c517
The same applies for
ChatController.prototype.sendMessage()
:amazon-connect-chatjs/src/core/chatController.js
Lines 96 to 99 in d85c517
amazon-connect-chatjs/src/core/chatArgsValidator.js
Lines 12 to 17 in d85c517
amazon-connect-chatjs/src/core/chatArgsValidator.js
Lines 19 to 21 in d85c517
The same would apply for
ChatController.prototype.sendAttachment()
, though it has not been added yet:amazon-connect-chatjs/src/core/chatController.js
Lines 107 to 110 in d85c517
Problem:
However, the
CONTENT_TYPE
enum is overly permissive. It has the allowed content types for:amazon-connect-chatjs/src/constants.js
Lines 68 to 101 in d85c517
This results in unnecessary invocations when a content type is invalid for the operation being invoked, but valid on either of the other two.
Proposed fix:
Make the validation stricter to only allow the content types of the invoked operation.
The text was updated successfully, but these errors were encountered: