差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 | 后一修订版 两侧同时换到之后的修订记录 | ||
im:ios:basics:message [2020/06/25 02:41] jliu |
im:ios:basics:message [2020/07/27 04:42] huanxinfudh [获取单个会话未读消息数] |
||
---|---|---|---|
行 482: | 行 482: | ||
==== 获取单个会话未读消息数 ==== | ==== 获取单个会话未读消息数 ==== | ||
<code objc> | <code objc> | ||
+ | /*! | ||
+ | * \~chinese | ||
+ | * 获取一个会话 | ||
+ | * | ||
+ | * @param aConversationId 会话ID | ||
+ | * @param aType 会话类型 | ||
+ | * @param aIfCreate 如果不存在是否创建 | ||
+ | * | ||
+ | * @result 会话对象 | ||
+ | */ | ||
+ | - (EMConversation *)getConversation:(NSString *)aConversationId | ||
+ | type:(EMConversationType)aType | ||
+ | createIfNotExist:(BOOL)aIfCreate; | ||
+ | |||
EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:@"8001" type:EMConversationTypeChat createIfNotExist:YES]; | EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:@"8001" type:EMConversationTypeChat createIfNotExist:YES]; | ||
[conversation unreadMessagesCount]; | [conversation unreadMessagesCount]; |