Skip to main content

Check DM Status

The checkDMStatus method is used to check the status of the Direct Message (DM) functionality for a specific user. It provides information on whether the DM feature is available and any related call-to-action (CTA) messages.

Steps to Check DM Status

  1. Create a CheckDMStatusRequest object with the required reqFrom parameter and optionally the uuid.
  2. Call the checkDMStatus() function using the instance of the LMChatClient class.
  3. Use the response (LMResponse<CheckDMStatusResponse>) to retrieve the DM status data.
CheckDMStatusRequest request = (CheckDMStatusRequestBuilder()
..reqFrom("source") // Provide the request source
..uuid("user-uuid")) // Optionally provide the user UUID
.build();

final LMResponse<CheckDMStatusResponse> response = await lmChatClient.checkDMStatus(request);

if (response.success) {
// Use the retrieved DM status data
handleDMStatus(response.data);
} else {
// Handle error
handleError(response);
}
tip

The reqFrom parameter is required to specify the source of the request. You can optionally provide the uuid to check the DM status for a specific user.

Models

CheckDMStatusRequest

List of parameters for the CheckDMStatusRequest class:

VariableTypeDescriptionOptional
reqFromStringThe source of the DM status request
uuidStringUnique identifier for the user✔️

CheckDMStatusResponse

List of parameters for the CheckDMStatusResponse class:

VariableTypeDescriptionOptional
ctaStringCall-to-action message, if any✔️
showDmboolIndicates whether the DM feature is available✔️