Skip to main content

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) {

}];
ParameterTypeDescription
conversationTypeRCConversationTypeConversation type
targetIdNSStringConversation ID
contentNSStringDraft content

Retrieve Draft

Use getTextMessageDraft:targetId:completion: to retrieve the draft content.

[[RCCoreClient sharedCoreClient] getTextMessageDraft:ConversationType_PRIVATE
targetId:@"targetId"
completion:^(NSString *draft) {
}];
ParameterTypeDescription
conversationTypeRCConversationTypeConversation type
targetIdNSStringConversation ID

Delete Draft

Use clearTextMessageDraft:targetId:completion: to delete the draft.

[[RCCoreClient sharedCoreClient] clearTextMessageDraft:ConversationType_PRIVATE
targetId:@"targetId"
completion:^(BOOL success) {

}];
ParameterTypeDescription
conversationTypeRCConversationTypeConversation type
targetIdNSStringConversation ID