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