Skip to content

RtkWaitListParticipantUpdateEventListener

Last updated View as MarkdownAgent setup

A helper class for listening to waitlist participant events. Provides callbacks for join, remove, accept, and reject events, and methods for managing waitlist requests.

Initializer parameters

Parameter Type Required Default Description
rtkClient RealtimeKitClient - The RealtimeKit client instance

Callback properties

Property Type Required Default Description
participantJoinedCompletion (() -> Void)? nil Called when a participant joins the waitlist
participantRemovedCompletion (() -> Void)? nil Called when a participant is removed from the waitlist
participantRequestAcceptedCompletion (() -> Void)? nil Called when a waitlist request is accepted
participantRequestRejectCompletion (() -> Void)? nil Called when a waitlist request is rejected

Methods

Method Return Type Description
acceptWaitingRequest(participant:) Void Accepts a participant's waitlist request
rejectWaitingRequest(participant:) Void Rejects a participant's waitlist request
clean() Void Removes all registered listeners and cleans up resources

Usage Examples

Basic Usage

import RealtimeKitUI

let waitlistListener = RtkWaitListParticipantUpdateEventListener(
    rtkClient: rtkClient
)

waitlistListener.participantJoinedCompletion = {
    print("New participant in waitlist")
}

waitlistListener.participantRemovedCompletion = {
    print("Participant removed from waitlist")
}

Accept or reject requests

import RealtimeKitUI

let waitlistListener = RtkWaitListParticipantUpdateEventListener(
    rtkClient: rtkClient
)

// Accept a waiting participant
waitlistListener.acceptWaitingRequest(participant: waitingParticipant)

// Reject a waiting participant
waitlistListener.rejectWaitingRequest(participant: waitingParticipant)

Was this helpful?