Skip to main content

Update Channel Invite

Updates the status of a channel invite (e.g., accept or reject) based on the specified request parameters. This function allows users to change the status of a received channel invite.

Steps to update a channel invite

  1. Create an UpdateChannelInviteRequest object using the builder pattern.
  2. Call the updateChannelInvite() function using an instance of LMChatClient, passing the request object and an optional response handler.
  3. Process the response LMResponse<NoData> to handle the success or failure of the update operation.
let request = UpdateChannelInviteRequest.builder()
.channelId("12345")
.inviteStatus(.accepted)
.build()

LMChatClient.shared.updateChannelInvite(request: request) { response in
switch response {
case .success(_):
print("Channel invite status updated successfully.")
case .failure(let error):
print("Error updating channel invite: \(error.localizedDescription)")
}
}

Models

UpdateChannelInviteRequest

A request object for updating a channel invite in the LikeMinds Chat SDK. It provides a builder pattern for constructing instances with customizable parameters.

VARIABLETYPEDESCRIPTIONOPTIONAL
channelIdStringThe unique identifier of the channel
inviteStatusChannelInviteStatusThe desired invite status (e.g., accept or reject)

ChannelInviteStatus

Represents the status of a channel invite.

STATUSVALUEDESCRIPTION
invited0The invite is pending
accepted1The invite has been accepted
rejected2The invite has been rejected