revert to include sender, but no sent folder

This commit is contained in:
Benedikt Galbavy 2023-11-18 14:09:49 +01:00
parent eb910923e9
commit b9794d13c4
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,4 @@
#include "mail.h"
#include <cstdio>
#include <mutex>
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;

View File

@ -17,6 +17,7 @@ struct mail {
/* metadata */
u_int id;
int64_t timestamp;
std::string sender;
std::string recipient;
std::string subject;

View File

@ -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"];