Conversation Draft
Save Draft
Use saveTextMessageDraft:targetId:content:completion: to save a draft message to a specified conversation. Saving a draft will update the conversation's sentTime
, and the conversation will move to the top of the list.
[[RCCoreClient sharedCoreClient] saveTextMessageDraft:ConversationType_PRIVATE
targetId:@"targetId"
content:@"This is the draft content"
completion:^(BOOL success) {
}];
Parameter | Type | Description |
---|---|---|
conversationType | RCConversationType | Conversation type |
targetId | NSString | Conversation ID |
content | NSString | Draft content |
Retrieve Draft
Use getTextMessageDraft:targetId:completion: to retrieve the draft content.
[[RCCoreClient sharedCoreClient] getTextMessageDraft:ConversationType_PRIVATE
targetId:@"targetId"
completion:^(NSString *draft) {
}];
Parameter | Type | Description |
---|---|---|
conversationType | RCConversationType | Conversation type |
targetId | NSString | Conversation ID |
Delete Draft
Use clearTextMessageDraft:targetId:completion: to delete the draft.
[[RCCoreClient sharedCoreClient] clearTextMessageDraft:ConversationType_PRIVATE
targetId:@"targetId"
completion:^(BOOL success) {
}];
Parameter | Type | Description |
---|---|---|
conversationType | RCConversationType | Conversation type |
targetId | NSString | Conversation ID |