twilio/twilio-php

Twilio Typing Indicator

rmrmohan88 opened this issue · 2 comments

We already implemented the chat functionality and now we trying to implement the typing indicator functionality to show the typing status within the conversation to the chat participant.
To implement we followed the Twilio typing indicator documentation and based on that we implement the Sending Typing Indicator method.
Whiling trying to Consuming Typing Indicator method it's not working.
Can anyone please help with this how to implement the Twilio Consuming Typing Indicator method and how we can build this typing indicator feature.

Documentation link - https://www.twilio.com/docs/conversations/typing-indicator#typing-indicator-send

We used the sample code to send and consume the typing indicator status.

code:

Sending Typing Indicator

// intercept the keydown event
inputBox.on('keydown', function(e) {
// if the RETURN/ENTER key is pressed, send the message
if (e.keyCode === 13) {
sendButton.click();
} else {
// else send the Typing Indicator signal
activeConversation.typing();
}
});

Consuming Typing Indicator

//set up the listener for the typing started Conversation event
activeConversation.on('typingStarted', function(participant) {
//process the participant to show typing
updateTypingIndicator(participant, true);
});

//set the listener for the typing ended Conversation event
activeConversation.on('typingEnded', function(participant) {
//process the participant to stop showing typing
updateTypingIndicator(participant, false);
});

Technical details:

  • javascript:

Hi @rmkpmohan88 in order to properly help with this issue, please file a support ticket.

Thank you for your response.
I already added a support ticket and I got documentation and a sample code from the Twilio team, that's not solved my problem.