Check DM Tab
Checks the direct message (DM) tab for the user and retrieves relevant information, such as the status of conversations or pending messages.
Steps to check the direct message tab
- Call the
checkDMTab()
function using the instance ofLMChatClient
. - Process the response LMResponse<CheckDMTabResponse> to handle the relevant information.
LMChatClient.shared.checkDMTab { response in
if let result = response?.data {
// Handle success
print("DM Tab checked successfully.")
} else if let error = response?.error {
// Handle error
print("Error checking DM Tab: \(error.localizedDescription)")
}
}
Models
CheckDMTabResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
clicked | Bool | Indicates whether the DM tab was clicked | ✔️ |
messaged | Bool | Indicates whether a message has been sent via the DM tab | ✔️ |
hideDMTab | Bool | Indicates whether the DM tab should be hidden | ✔️ |
isCM | Bool | Indicates whether the user is a CollabMates member | ✔️ |
unreadDMCount | Int | Number of unread messages in the DM tab | ✔️ |