tencent cloud

All product documents
Chat
React Native
Last updated: 2025-01-10 17:45:39
React Native
Last updated: 2025-01-10 17:45:39

Feature Overview

A targeted group message is a message sent to specified members in a group, which cannot be received by other group members.
Note:
1. To use this feature, you need to purchase the Pro edition 、Pro Plus edition or Enterprise edition as instructed in Pricing.
2. When creating a group @ message, you cannot specify the list of group members to receive the message (receiverList).
3. The targeted group message feature is not available for community and audio-video (AVChatRoom) groups.
4. By default, targeted group messages are excluded from the unread count of the group conversation.

UI Display

By using the targeted group message feature, you can achieve the effect shown in the figure below:


Sending a Targeted Group Message

To send a targeted group message to specified members in a group, follow the instructions below:
Call the createXxxMessage API (here, Xxx indicates the message type) to create a message (specify the message recipients via receiverList).
Call the sendMessage API to send the message.
Sample
// Create a targeted group message
let message = chat.createTextMessage({
to: 'test',
conversationType: TencentCloudChat.TYPES.CONV_GROUP,
payload: {
text: 'Hello world!'
},
receiverList: ['user0', 'user1']
});

// Send the message
let promise = chat.sendMessage(message);
promise.then(function(imResponse) {
// Message sent successfully
console.log(imResponse);
}).catch(function(imError){
// The message failed to be sent
console.warn('sendMessage error:', imError);
});

Receiving a Targeted Group Message

By default, targeted group messages are excluded from the unread count of a group conversation.
A targeted group message can be received in the same way as an ordinary message.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon