diff --git a/server/mail.cpp b/server/mail.cpp index 3178861..449eec2 100644 --- a/server/mail.cpp +++ b/server/mail.cpp @@ -1,5 +1,4 @@ #include "mail.h" -#include #include mail::mail(std::string filename, std::string subject) : @@ -41,6 +40,7 @@ json mail::mailToJson() jsonfile["id"] = this->id; jsonfile["timestamp"] = this->timestamp; + jsonfile["sender"] = this->sender; jsonfile["recipient"] = this->recipient; jsonfile["subject"] = this->subject; jsonfile["filename"] = this->filename; diff --git a/server/mail.h b/server/mail.h index 2d8a83c..aef398f 100644 --- a/server/mail.h +++ b/server/mail.h @@ -17,6 +17,7 @@ struct mail { /* metadata */ u_int id; int64_t timestamp; + std::string sender; std::string recipient; std::string subject; diff --git a/server/user.cpp b/server/user.cpp index 402acc5..7453643 100644 --- a/server/user.cpp +++ b/server/user.cpp @@ -25,6 +25,7 @@ user::user(fs::path user_data_json) : m() mail_json["subject"] ); mail->id = mail_json["id"]; + mail->sender = mail_json["sender"]; mail->recipient = mail_json["recipient"]; mail->deleted = mail_json["deleted"];