Other types
Understand component events and shared data types.
An event object dispatched by the Chatbox's onBackButtonClick event.
Passed to the beforePermissionPrompt callback of Chatbox when a system permission dialog needs to be shown to the user.
Cancel whatever user action caused the permission to be requested.
For example, if a user wants to share their location for the first time so that this event is triggered, then if you call cancel(), no permission will be requested from the system, the location sharing will be cancelled, and TalkJS will continue as if the location sharing button had not been clicked at all.
This may be useful if you're using this event to show custom UI elements that nudge users towards granting permission, and this UI has a "cancel" button.
The types of permissions requested.
Show the system permission prompt that lets the user allow or deny this permission.
When the user clicks "Allow", then the user action that triggered the system permission request will proceed and the return value is GrantResult.GRANTED.
When the user clicks "Deny", then the user action is cancelled, the onMissingPermission callback of Chatbox is triggered, and the return value is GrantResult.DENIED.
Values:
- GRANTED
- DENIED
An event object dispatched by the Chatbox's onDeleteMessage event.
The conversation that the message used to be in.
The message that was just deleted.
Sent by the onMissingPermission callback of Chatbox when the user tried to do an action that require explicit system permission, but that permission has been denied.
This event is meant to let you show a message to the user if an action (eg sharing a location, or enabling notifications) can't proceed because the system permission for that has been denied.
If you want to control when to show the system permissions prompt, use beforePermissionPrompt.
This event is emitted both when the user has denied this permission in the past, and when a user action just triggered a system permissions prompt which the user then denied. If you need to differentiate between these two cases, use beforePermissionPrompt, and inspect the return value of PermissionPromptRequest.showPrompt.
The types of permissions that were denied.
An event object dispatched by the ConversationList's onSelectConversation event.
The newly-selected conversation, or null if a conversation was de-selected.
The message that was scrolled into view within the conversation
An event object dispatched by the Chatbox's onSendMessage event.
The conversation the message was sent in.
The message that was just sent.
An event object dispatched by the Chatbox's onMessageAction event.
The name of the action that was triggered.
The current conversation.
The message that contained the action link or action button.
The parameters of the action that was triggered, if any.
An event object dispatched by the Chatbox's onFocusMessage event.
The message that was focused (or null if the focus was cleared)
Values:
- CLASSIC
- DEFAULT