Event: "typing:change"

When another user in the system starts or stops typing, the typing:change event will be emitted. The current user will only be notified of this event if they have at least one 1-on-1 or group conversation with this other user.

Properties

PropertyTypeDescription
isTypingbooleantrue if typing started, false if typing stopped
contextIdstringThe ID of the context in which the typing is taking place: can be either a Group ID, an Organization ID, or null if the typing is applicable globally
contextTypestringThe type of context in which the typing is taking place: can be either client.enums.typingContext.GROUP if the typing is taking place in a group, client.enums.typingContext.ORGANIZATION if the typing is taking place in a p2p conversation within a specific organization, or client.enums.typingContext.GLOBAL if the typing is applicable globally to all p2p conversations with this user
userIdstringID of User that is typing

Examples

client.on('typing:change', function onTypingChange(e) {
console.log(
e.userId,
(e.isTyping ? 'started' : 'stopped') + ' typing',
'with a contextId of ' + e.contextId
);
});