From b9794d13c48ecb421a4a38f7b1e8582d43eb6d8c Mon Sep 17 00:00:00 2001 From: Benedikt Galbavy Date: Sat, 18 Nov 2023 14:09:49 +0100 Subject: [PATCH] revert to include sender, but no sent folder --- server/mail.cpp | 2 +- server/mail.h | 1 + server/user.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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"];