Sends a direct message to a participant if certain conditions are met.
This method checks the current user's level and their co-host responsibilities
to determine if they are allowed to send a direct message to a specified participant.
If the user has the appropriate permissions, the method updates the direct message
details and opens the messages modal. If the user is not allowed to send the message,
an alert is displayed.
Param: options
The options for sending a message to a participant.
Param: options.coHostResponsibility
Array of responsibilities assigned to the co-host.
Param: options.participant
The participant to whom the message is to be sent.
Param: options.member
The current member attempting to send the message.
Param: options.islevel
The level of the current member.
Param: options.showAlert
Function to show an alert message if the message cannot be sent.
Param: options.coHost
The co-host member.
Param: options.updateIsMessagesModalVisible
Function to update the visibility of the messages modal.
Param: options.updateDirectMessageDetails
Function to update the details of the direct message.
Sends a direct message to a participant if certain conditions are met.
This method checks the current user's level and their co-host responsibilities to determine if they are allowed to send a direct message to a specified participant. If the user has the appropriate permissions, the method updates the direct message details and opens the messages modal. If the user is not allowed to send the message, an alert is displayed.
Param: options
The options for sending a message to a participant.
Param: options.coHostResponsibility
Array of responsibilities assigned to the co-host.
Param: options.participant
The participant to whom the message is to be sent.
Param: options.member
The current member attempting to send the message.
Param: options.islevel
The level of the current member.
Param: options.showAlert
Function to show an alert message if the message cannot be sent.
Param: options.coHost
The co-host member.
Param: options.updateIsMessagesModalVisible
Function to update the visibility of the messages modal.
Param: options.updateDirectMessageDetails
Function to update the details of the direct message.
Param: options.updateStartDirectMessage
Function to start the direct message.
Returns
Example