Room

iOS Room APIs

Create a chat room

client?.createRoom(parameters: params, completion: { response in })

Parameters:

MXRoomCreationParameters

NameTypeDescriptionRequired

type

string

type of login (the type of the above example is m.login.did.identity)

true

updated

string

updated time returned by the pre_login

true

identifier

json

login information

true

device_id

string

device id, not needed for new device

false

Join a chat room

client?.joinRoom(room_id, completion: { response in })

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

Invite user to the room

client?.invite(user_id, toRoom: room_id) { response in }

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

user_id

string

user id

true

Leave the room

client?.leaveRoom(room_id, completion: { response in })

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

Remove a user from the room

client?.banUser(user_id, fromRoom: room_id, reason: reason, completion: { response in })

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

user_id

String

user id

true

reason

String

reason string

true

Modify room name

client?.setName(ofRoom: room_id, name: name, completion: { response in })

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

name

string

new room name

true

Get room name

client?.name(ofRoom: room_id, completion: { response in })

Parameters:

NameTypeDescriptionRequired

room_id

string

room id

true

Last updated