[**RongIMLib**](../README.md) *** [RongIMLib](../globals.md) / addConversationsToTag # Function: addConversationsToTag() > **addConversationsToTag**(`tagId`, `conversations`): `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`void`\>\> 添加会话到指定标签 ## Parameters ### tagId `string` 标签 ID ### conversations [`IConversationIdentifier`](../interfaces/IConversationIdentifier.md)[] 会话信息,包含会话类型、会话 ID 和 channelId,类型为 [IConversationOption](../type-aliases/IConversationOption.md) 数组 ## Returns `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`void`\>\> ## Description 添加会话到指定标签,一个会话可以添加到多个标签 **注意**: 1. 每个标签下最多可以添加 1000 个会话 2. 如果标签下已添加 1000 个会话,继续在该标签下添加会话仍会成功,但会导致最早添加标签的会话被移除标签 3. 同一个会话可以设置多个不同的标签 ## Example **添加会话到指定标签示例:** ```ts const tagId = 'tagId'; const conversations = [{ conversationType: RongIMLib.ConversationType.PRIVATE, targetId: 'targetId', }]; const res = await RongIMLib.addConversationsToTag(tagId, conversations); console.log('添加会话到指定标签结果:', res); ```