mentionFragments property
Get the mention fragments for this user.
Implementation
Set<String> get mentionFragments {
final displayName = this.displayName;
if (displayName == null ||
displayName.isEmpty ||
{'[', ']', ':'}.any(displayName.contains)) {
return {};
}
final identifier =
'@${RegExp(r'^\w+$').hasMatch(displayName) ? displayName : '[$displayName]'}';
final hash = _hash(id);
return {identifier, '$identifier#$hash'};
}