typingStatus.stopTyping()

Sends a notification to an online user (in 1:1 conversation) or group members (in group conversations) that current user has stopped typing in a conversation. If counterPartyId is undefined, take no action.

This is the counterpart to client.typingStatus.startTyping().

When another user in the system starts or stops typing, the typing:change event will be emitted.

Definition

client.typingStatus.stopTyping(
counterPartyId: string|User|Group|void,
{
organizationId: string,
senderId: ?string
}
):Promise<void,Error>

Parameters

ParameterTypeDescription
counterPartyIdstringUser
optionsObjectOptions (described below)

Options

ParameterTypeDescription
organizationIdstringThe ID of the organization in which the conversation is taking place
senderId?stringIf sending as a role, the ID of the role that was doing the typing

Response

Once the returned Promise is resolved, the typing notification will have been sent to the server.

Example

For a p2p conversation with a user:

await client.typingStatus.stopTyping(
user.id,
{
organizationId: conversation.organizationId
}
);

For a group conversation:

await client.typingStatus.stopTyping(
group.id,
{
organizationId: conversation.organizationId
}
);