- Android
- iOS
- JavaScript
- Flutter
- ReactNative
获取标签下所有会话的未读消息总数。
接口定义
/**
* 根据标签 id 获取消息未读总数
* @param tagId 标签 id
* @return 消息未读总数
*/
int getUnreadCountWithTag(String tagId);
获取标签下的会话列表,支持分页获取。
接口定义
/// 根据标签 id 获取消息未读总数
/// - Parameter tagId: 标签 id
- (int)getUnreadCountWithTag:(NSString *)tagId;
暂未提供
暂未提供
获取标签下所有会话的未读消息总数。
接口定义
/**
* 获取标签未读消息数
* @param conversationTypes 会话类型列表,可选
*/
getUnreadCountWithTypes(conversationTypes?: number[]): Promise<number>;
示例代码
import JuggleIM from 'juggleim-rnsdk';
// 获取全部会话的未读总数
const count = await JuggleIM.getUnreadCountWithTypes();
// 获取指定类型会话的未读总数
const count = await JuggleIM.getUnreadCountWithTypes([1]);