addContactToGroup

abstract fun addContactToGroup(groupId: String?, contactId: String?, listener: RainbowListener<Unit, Unit>?)

Adds a contact to a specific group.

This method allows you to add a contact identified by contactId to a group specified by groupId. The contact is included in the group, and the group's details are updated in the groups property.

If either the groupId or contactId is null or empty, the method returns immediately, and the listener's onError method is triggered with an appropriate error message.

If the contact is successfully added to the group, the listener's onSuccess method is called to indicate that the operation was completed successfully.

Parameters

groupId

The unique identifier of the group to which the contact will be added. If null or empty, the method returns immediately, and the listener's onError method is called.

contactId

The unique identifier of the contact to add to the group. If null or empty, the method returns immediately, and the listener's onError method is called.

listener

An optional RainbowListener that will be notified with the result of the add operation.