Skip to main content

Mentions (@ messages)

Overview

Send @ messages in group channels to notify all members or specific users.

Type reference

Mention class: MentionedInfo

PropertyTypeDescription
typeMentionedTypeMention type
userIdListList<String>List of mentioned user IDs
mentionedContentString?The content displayed in local notifications and push notifications for the @ mention

Code example

Dart
final channel = GroupChannel('<group-id>');
await channel.sendMessage(
SendMessageParams(
messageParams: TextMessageParams(
text: 'Hello @user1!',
mentionedInfo: MentionedInfoParams(
type: MentionedType.part,
userIdList: ['user1'],
mentionedContent: 'Hello @user1!',
),
),
),
);