Create Chatroom - imkit/imkit-ios-framework-v3 GitHub Wiki
There are two types of chatroom, direct chat and group chat.
- Two people only.
- Any two people can only have one direct chatroom.
- Number of chatroom members is not limited.
- Any group of people can have multiple group chatrooms.
Tasks
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().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 |