2025-10-09 16:48:46 +08:00

63 lines
1.2 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// V2NIMConversationIdUtil.h
// NIMLib
//
// Created by Netease.
// Copyright (c) 2023 Netease. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "V2NIMConversationEnum.h"
NS_ASSUME_NONNULL_BEGIN
/// 会话id
@interface V2NIMConversationIdUtil : NSObject
/**
* 使用账号Id构造会话id
*
* @param accountId 账号Id
* @return 返回会话id
* @discussion
*/
+ (nullable NSString *)p2pConversationId:(NSString *)accountId;
/**
* 使用群Id构造会话id
*
* @param teamId 群Id
* @return 返回会话id
* @discussion
*/
+ (nullable NSString *)teamConversationId:(NSString *)teamId;
/**
* 使用群Id构造会话id超大群
*
* @param teamId 群Id
* @return 返回会话id
* @discussion
*/
+ (nullable NSString *)superTeamConversationId:(NSString *)teamId;
/**
* 从会话id中获取会话类型
*
* @param conversationId 会话id
* @return 返回会话类型
* @discussion
*/
+ (V2NIMConversationType)conversationType:(NSString *)conversationId;
/**
* 从会话id中获取会话对象id
*
* @param conversationId 会话id
* @return 返回会话对象id
* @discussion
*/
+ (nullable NSString *)conversationTargetId:(NSString *)conversationId;
@end
NS_ASSUME_NONNULL_END