feat: include 3 recent Message-IDs in References header

Do not include oldest reference, because chat members
which have been added later and have not seen the first message
do not have referenced message in the database.

Instead, include up to 3 recent Message-IDs.
This commit is contained in:
link2xt
2024-03-21 19:43:13 +00:00
parent 0e5db36205
commit e59ff6ca74
4 changed files with 115 additions and 53 deletions

View File

@@ -64,7 +64,15 @@ pub struct MimeFactory<'a> {
loaded: Loaded,
msg: &'a Message,
in_reply_to: String,
/// Space-separated list of Message-IDs for `References` header.
///
/// Each Message-ID in the list
/// may or may not be enclosed in angle brackets,
/// angle brackets must be added during message rendering
/// as needed.
references: String,
req_mdn: bool,
last_added_location_id: Option<u32>,