Skip to main content

getOneConversation

Description

info

Get conversation information. Specify groupID for group chat, specify counterparty's userID for one-to-one chat.

Function Prototype


- (void)getOneConversationWithSessionType:(OIMConversationType)sessionType
sourceID:(NSString *)sourceID
onSuccess:(nullable OIMConversationInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeRequiredDescription
sessionTypeOIMConversationTypeYesSession type
sourceIDNSStringYesUser ID for one-to-one chat, group ID for group chat

Return Result

NameTypeDescription
onSuccessOIMConversationInfoSuccess return
onFailureOIMFailureCallbackFailure return

Code Example


[OIMManager.manager getOneConversationWithSessionType:
sourceID:@""
onSuccess:^(OIMConversationInfo * _Nullable conversation) {

} onFailure:^(NSInteger code, NSString * _Nullable msg) {

}];