-
Couldn't load subscription status.
- Fork 2
Create Chatroom
howardfuntek edited this page Feb 7, 2019
·
2 revisions
There are two types of chatroom, direct chat and group chat.
- Direct Chat
- Two people only.
- Any two people can only have one direct chatroom.
- Group Chat
- Number of chatroom members is not limited.
- Any group of people can have multiple group chatrooms.
- 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 |