Skip to content

Create Chatroom

howardfuntek edited this page Feb 7, 2019 · 2 revisions

There are two types of chatroom, direct chat and group chat.

  • Direct Chat
  1. Two people only.
  2. Any two people can only have one direct chatroom.
  • Group Chat
  1. Number of chatroom members is not limited.
  2. Any group of people can have multiple group chatrooms.

Tasks

  • IMCreateDirectChatTask
IMCreateDirectChatTask().perform(roomName: String?, coverURL: URL?, description: String?, invitee: String, isSystemMessageEnabled: Bool)
.done { room in
                
}
Parameter Type Required/Optional Default Value Description
roomName String? Optional nil displayed name of the chatroom
coverURL URL? Optional nil cover URL of the chatroom
description String? Optional nil description of the chatroom
invitee String Required user id of invitee
isSystemMessageEnabled Bool Optional false dertermine if a system message should be appended to the chatroom
  • IMCreateGroupChatTask
IMCreateGroupChatTask().perform(roomName: String?, coverURL: URL?, description: String?, invitees: [String], isSystemMessageEnabled: Bool)
.done { room in
                
}
Parameter Type Required/Optional Default Value Description
roomName String? Optional nil displayed name of the chatroom
coverURL URL? Optional nil cover URL of the chatroom
description String? Optional nil description of the chatroom
invitees [String] Required user ids of invitees
isSystemMessageEnabled Bool Optional true dertermine if a system message should be appended to the chatroom
Clone this wiki locally