Mentions (@ messages)
Overview
Send @ messages in group channels to notify all members or specific users.
Type reference
Mention class: MentionedInfo
| Property | Type | Description |
|---|---|---|
type | MentionedType | Mention type |
userIdList | List<String> | List of mentioned user IDs |
mentionedContent | String? | 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!',
),
),
),
);