跳到主要内容

getOneConversation

功能介绍

说明

获取会话信息,群聊指定groupID,单聊指定对方的userID

函数原型


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

输入参数

参数名称参数类型是否必填描述
sessionTypeOIMConversationType会话类型
sourceIDNSString单聊为用户 ID,群聊为群ID

返回结果

名称类型描述
onSuccessOIMConversationInfo成功返回
onFailureOIMFailureCallback失败返回

代码示例


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

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

}];