fetchUsers

abstract suspend fun fetchUsers(    channel: Channel,     limit: Int = 100,     offset: Int = 0,     userTypes: List<ChannelUserAffiliationType>? = null,     invitedUser: Boolean = false): RainbowResult<List<ChannelUser>>

Fetch users from a specific channel.

This method retrieves a list of users associated with a specific channel. The users can be filtered by their affiliation type (e.g., OWNER, PUBLISHER, MEMBER) or by whether they are invited users.

Return

A RainbowResult containing a list of ChannelUser objects representing the users in the channel. If the operation fails, the result will include error details.

Parameters

channel

The Channel object from which users are retrieved.

limit

An Int specifying the maximum number of users to retrieve (default value is 100).

offset

An Int specifying the position of the first user to retrieve (default value is 0).

userTypes

An optional List of ChannelUserAffiliationType values to filter users by their affiliation (e.g., OWNER, PUBLISHER, MEMBER).

invitedUser

A Boolean indicating whether to include only invited users (true) or exclude them (false). If set to false, only regular members are included.