createGroup

js
suspend fun createGroup(members: Iterable<<ERROR CLASS>>, title: String, avatar: String? = null, timer: Int? = null, memberRole: String? = null): <ERROR CLASS>

Creates a new group and returns the information of the newly created group.

Parameters

members

The members to include in the group.

title

The title of the group.

avatar

A link to an image on the local filesystem. Example: /tmp/image.jpg

timer

The message expiration timer for the group.

memberRole

The role of all members other than the group creator. Options are ADMINISTRATOR or DEFAULT (case-insensitive). Example: "ADMINISTRATOR"

Throws

RequestFailedException

if signald sends an error response or the incoming message is invalid

SignaldException

if the request to the socket fails

synchronousClient
fun createGroup(members: Iterable<JsonAddress>, title: String, avatar: String? = null, timer: Int? = null, memberRole: String? = null): JsonGroupV2Info

Creates a new group and returns the information of the newly created group.

Parameters

members

The members to include in the group.

title

The title of the group.

avatar

A link to an image on the local filesystem. Example: /tmp/image.jpg

timer

The message expiration timer for the group.

memberRole

The role of all members other than the group creator. Options are ADMINISTRATOR or DEFAULT (case-insensitive). Example: "ADMINISTRATOR"

Throws

org.inthewaves.kotlinsignald.clientprotocol.RequestFailedException

if signald sends an error response or the incoming message is invalid

org.inthewaves.kotlinsignald.clientprotocol.SignaldException

if the request to the socket fails