sippo-sdk / com.quobis.sippo.sipposdk.group / Group

Group

class Group

A group instance.

This class allows performing actions over this specific group like adding, expelling or checking its participants. It also allows adding a listener to receive events related to this particular instance (@see GroupListener).

Properties

info

val info: GroupInfo

rx

val rx: GroupRx

Access to the reactive API of the group.

Functions

add

fun add(participant: User, onCompletion: (SippoResourceError?) -> Unit): Unit

Adds a new participant to this group. Note: The user needs to be the group's owner.

addListener

fun addListener(listener: GroupListener): Unit

Adds a listener to receive group events.

hasParticipant

fun hasParticipant(participant: User, onCompletion: (Either<Boolean, SippoResourceError>) -> Unit): Unit

Checks if a participant belongs to this group.

leave

fun leave(onCompletion: (SippoResourceError?) -> Unit): Unit

Leaves this group.

remove

fun remove(participant: User, onCompletion: (SippoResourceError?) -> Unit): Unit

Removes a participant from this group. Note: The user needs to be the group's owner.

removeAllParticipants

fun removeAllParticipants(onCompletion: (SippoResourceError?) -> Unit): Unit

Removes all participants from this group. Note: The user needs to be the group's owner.

removeListener

fun removeListener(listener: GroupListener): Unit

Removes the specified listener.

update

fun update(name: String, onCompletion: (SippoResourceError?) -> Unit): Unit

Updates the group name. Note: The user needs to be the group's owner.