useMsTeamsConnectionStatus
The useMsTeamsConnectionStatus hook is used to check and manage the current Microsoft Teams connection status for a user. This hook is typically used internally by the KnockMsTeamsProvider and is not commonly used directly in application code.
Parameters
#The authenticated Knock client instance.
The Knock channel ID for the Microsoft Teams integration.
The tenant ID for multi-tenant applications.
Returns
#Returns an object with the following properties:
The current connection status: 'connecting' | 'connected' | 'disconnected' | 'error' | 'disconnecting'.
Function to update the connection status.
Error message if the connection check failed.
Function to set an error message.
Label for the current action being performed.
Function to set an action label.
Example
#Basic usage
#This hook is typically used internally by the KnockMsTeamsProvider. If you need to access the connection status in your components, use the useKnockMsTeamsClient hook instead:
Advanced usage
#If you need to use this hook directly: