mentions property

({bool room, List<String> userIds}) get mentions

Returns the mentioned userIds and whether the event includes an @room mention. This is only determined by the m.mention object in the event content.

Implementation

({List<String> userIds, bool room}) get mentions {
  final mentionsMap = content.tryGetMap<String, Object?>('m.mentions');
  return (
    userIds: mentionsMap?.tryGetList<String>('user_ids') ?? [],
    room: mentionsMap?.tryGet<bool>('room') ?? false,
  );
}