Closed nayabrasool4910 closed 1 year ago
Hi, can you please try to follow the documentation in this section https://github.com/amazon-connect/amazon-connect-chatjs#connectchatsessioncreate?
Hi @nayabrasool4910 , it appears this syntax error is not related to ChatJS. Going to resolve the issue.
Please refer the documentation as mentioned above. If you have further questions, please feel free to reach out or re-open.
From the snippet you have shared, here is a small change that may resolve the error. Please provide more details if there are different errors relating to ChatSession methods
@Component({
// Component metadata here
})
export class YourComponent implements OnInit {
constructor() { }
+ getcall() {
+ console.log('call get method')
+ }
ngOninit() {
connect.contact(function (contact) {
contact.onAccepted(async () => {
const accept = 'Accepted'
- this.getcall(){
- console.log('call get method')
- }
+ this.getcall()
const cnn = contact.getAgentConnection() as connect.ChatConnection;
if (cnn) {
const agentChatSession = await cnn.getMediaController();
agentChatSession.onMessage((res) => {
console.log(res);
});
}
});
})
}
}
Thanks, Spencer
Hi, I am trying to call function after connecting chat from AgentChatSession to CustomerChatSession using angular.
my code
I am getting error like getcall() is not a function. Can you please put your comments. It will be helpfull to me. Thanks in advance.