setConversationDraft
API, so that the user can get back to it through the draftText
field of the Conversation
object and finish it.chat.setConversationDraft(options);
Name | Type | Description |
conversationID | String | Conversation ID, which consists of: C2C${userID} (for one-to-one chats)GROUP{groupID} (for group chats) |
draftText | String | draft content, passing an empty string '' indicates canceling the draft. |
Promise
let promise = chat.setConversationDraft({conversationID: 'GROUPpublic1',draftText: '123'});promise.then(function(imResponse) {}).catch(function(imError) {console.warn('setConversationDraft error:', imError);});
// Canceling a conversation draftlet promise = chat.setConversationDraft({conversationID: 'GROUPpublic1',draftText: ''});promise.then(function(imResponse) {}).catch(function(imError) {console.warn('setConversationDraft error:', imError);});
Was this page helpful?