deleteContactFromGroup

abstract suspend fun deleteContactFromGroup(groupId: String?, contactId: String?): RainbowResult<Unit>

Removes a contact from a specific group.

This method removes a contact, identified by contactId, from the group specified by groupId. The result is returned as a RainbowResult, indicating success or failure. Upon success, the group's details are updated in the groups property.

Validation Rules:

  • groupId must not be null or empty.

  • contactId must not be null or empty.

Behavior:

  • If groupId or contactId is null or empty, the function returns a Failure with an appropriate error message.

  • If the contact is successfully removed, a success is returned.

  • If the removal fails, a Failure with error details is returned.

Return

A RainbowResult indicating success or failure.

Parameters

groupId

The unique identifier of the group from which the contact will be removed. Must not be null or empty.

contactId

The unique identifier of the contact to remove. Must not be null or empty.