diff --git a/server/mail.cpp b/server/mail.cpp index 1b64162..7a2fdf9 100644 --- a/server/mail.cpp +++ b/server/mail.cpp @@ -10,10 +10,11 @@ mail::mail(std::string filename, std::string subject, std::string sender) : m_file() {} -mail::mail(std::string filename, int64_t timestamp, std::string subject) : +mail::mail(std::string filename, int64_t timestamp, std::string subject, std::string sender) : filename(filename), timestamp(timestamp), subject(subject), + sender(sender), deleted(false), m_file() {} diff --git a/server/mail.h b/server/mail.h index 55cb8ef..e983552 100644 --- a/server/mail.h +++ b/server/mail.h @@ -24,7 +24,7 @@ struct mail { bool deleted; mail(std::string filename, std::string subject, std::string sender); - mail(std::string filename, int64_t timestamp, std::string subject); + mail(std::string filename, int64_t timestamp, std::string subject, std::string sender); bool operator()(const u_int& id) const { return id == this->id; diff --git a/server/user.cpp b/server/user.cpp index 7453643..50251d3 100644 --- a/server/user.cpp +++ b/server/user.cpp @@ -22,10 +22,10 @@ user::user(fs::path user_data_json) : m() mail* mail = new struct mail( mail_json["filename"], mail_json["timestamp"], - mail_json["subject"] + mail_json["subject"], + mail_json["sender"] ); mail->id = mail_json["id"]; - mail->sender = mail_json["sender"]; mail->recipient = mail_json["recipient"]; mail->deleted = mail_json["deleted"];