toJson method
Implementation
Map<String, Object?> toJson() {
final profileTag = this.profileTag;
return {
'actions': actions.map((v) => v).toList(),
'event': event.toJson(),
if (profileTag != null) 'profile_tag': profileTag,
'read': read,
'room_id': roomId,
'ts': ts,
};
}