"@A @B @C......"
, which can be further edited before sent.
In the group chat list of the receiver's conversation UI, the identifier "someone@me"
or "@all"
will be displayed to remind the user that the user was mentioned by someone in the group chat.Listening for the @ character for selection of group members | Editing and sending the group @ message | Receiving the group @ message |
| | |
Cell
.V2TimMessage
object, while the nickname is to be displayed in the text box.createTextAtMessage
API (Details) to create a text @ message, get the V2TIMMessage
object, and specify the target group members.sendMessage
API (Details) to send the created @ message.const text = "123";const atUserList = ['user1','user2','all'];// Create a group @ messageconst atMsgRes = await TencentImSDKPlugin.v2TIMManager.getMessageManager().createTextAtMessage(text, atUserList);// Send the group @ messageTencentImSDKPlugin.v2TIMManager.getMessageManager().sendMessage(id: atMsgRes.data.id,receiver: "",groupID: "",);
groupAtInfolist
API (Details) of V2TimConversation
to get the @ data list of the conversation.atType
API (Details) of the V2TimGroupAtInfo
object in the list to get the @ data type and update it to the @ information of the conversation.const nextSeq = "";const count = 10;const getConversationList = await TencentImSDKPlugin.v2TIMManager.getConversationManager().getConversationList(nextSeq, count);if (getConversationList.code == 0) {getConversationList.data.conversationList.forEach((element) => {element.groupAtInfoList.forEach((element) => {if (element.atType == 0) {// @me}if (element.atType == 1) {// @all}if (element.atType == 2) {// @all and @me}});});}
Was this page helpful?