factory UserMessage.fromJsonWithChat(Chat chat, Map<String, dynamic> json) { return UserMessage.fromJson(json)..set(chat); }