diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 6180fba9e..7ef45647a 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -6650,6 +6650,8 @@ void dc_event_unref(dc_event_t* event); /// "Message opened" /// /// Used in subjects of outgoing read receipts. +/// +/// @deprecated Deprecated 2024-07-26 #define DC_STR_READRCPT 31 /// "The message '%1$s' you sent was displayed on the screen of the recipient." @@ -6657,7 +6659,7 @@ void dc_event_unref(dc_event_t* event); /// Used as message text of outgoing read receipts. /// - %1$s will be replaced by the subject of the displayed message /// -/// @deprecated Deprecated 2024-06-23, use DC_STR_READRCPT_MAILBODY2 instead. +/// @deprecated Deprecated 2024-06-23 #define DC_STR_READRCPT_MAILBODY 32 /// @deprecated Deprecated, this string is no longer needed. @@ -7376,11 +7378,6 @@ void dc_event_unref(dc_event_t* event); /// Used as info message. #define DC_STR_SECUREJOIN_WAIT_TIMEOUT 191 -/// "The message is a receipt notification." -/// -/// Used as message text of outgoing read receipts. -#define DC_STR_READRCPT_MAILBODY2 192 - /// "Contact". Deprecated, currently unused. #define DC_STR_CONTACT 200 diff --git a/node/constants.js b/node/constants.js index 9296e6ea7..2319631b2 100644 --- a/node/constants.js +++ b/node/constants.js @@ -267,7 +267,6 @@ module.exports = { DC_STR_REACTED_BY: 177, DC_STR_READRCPT: 31, DC_STR_READRCPT_MAILBODY: 32, - DC_STR_READRCPT_MAILBODY2: 192, DC_STR_REMOVE_MEMBER_BY_OTHER: 131, DC_STR_REMOVE_MEMBER_BY_YOU: 130, DC_STR_REPLY_NOUN: 90, diff --git a/node/lib/constants.ts b/node/lib/constants.ts index 553f145ec..3c611720e 100644 --- a/node/lib/constants.ts +++ b/node/lib/constants.ts @@ -267,7 +267,6 @@ export enum C { DC_STR_REACTED_BY = 177, DC_STR_READRCPT = 31, DC_STR_READRCPT_MAILBODY = 32, - DC_STR_READRCPT_MAILBODY2 = 192, DC_STR_REMOVE_MEMBER_BY_OTHER = 131, DC_STR_REMOVE_MEMBER_BY_YOU = 130, DC_STR_REPLY_NOUN = 90, diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 25c43d392..4daf73e95 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -454,7 +454,7 @@ impl MimeFactory { }; stock_str::subject_for_new_contact(context, self_name).await } - Loaded::Mdn { .. } => stock_str::read_rcpt(context).await, + Loaded::Mdn { .. } => "Receipt Notification".to_string(), // untranslated to no reveal sender's language }; Ok(subject) @@ -672,7 +672,7 @@ impl MimeFactory { }) } } - Loaded::Mdn { .. } => self.render_mdn(context).await?, + Loaded::Mdn { .. } => self.render_mdn()?, }; let get_content_type_directives_header = || { @@ -1400,7 +1400,7 @@ impl MimeFactory { } /// Render an MDN - async fn render_mdn(&mut self, context: &Context) -> Result { + fn render_mdn(&mut self) -> Result { // RFC 6522, this also requires the `report-type` parameter which is equal // to the MIME subtype of the second body part of the multipart/report // @@ -1426,16 +1426,15 @@ impl MimeFactory { "multipart/report; report-type=disposition-notification".to_string(), )); - // first body part: always human-readable, always REQUIRED by RFC 6522 - let message_text = format!( - "{}\r\n", - format_flowed(&stock_str::read_rcpt_mail_body(context).await) - ); + // first body part: always human-readable, always REQUIRED by RFC 6522. + // untranslated to no reveal sender's language. + // moreover, translations in unknown languages are confusing, and clients may not display them at all let text_part = PartBuilder::new().header(( "Content-Type".to_string(), "text/plain; charset=utf-8; format=flowed; delsp=no".to_string(), )); - let text_part = self.add_message_text(text_part, message_text); + let text_part = + self.add_message_text(text_part, "This is a receipt notification.\r\n".to_string()); message = message.child(text_part.build()); // second body part: machine-readable, always REQUIRED by RFC 6522 diff --git a/src/stock_str.rs b/src/stock_str.rs index 1d20bb6fc..4f3ce03dd 100644 --- a/src/stock_str.rs +++ b/src/stock_str.rs @@ -80,9 +80,6 @@ pub enum StockMessage { #[strum(props(fallback = "Fingerprints"))] FingerPrints = 30, - #[strum(props(fallback = "Return receipt"))] - ReadRcpt = 31, - #[strum(props(fallback = "End-to-end encryption preferred"))] E2ePreferred = 34, @@ -440,9 +437,6 @@ pub enum StockMessage { fallback = "Could not yet establish guaranteed end-to-end encryption, but you may already send a message." ))] SecurejoinWaitTimeout = 191, - - #[strum(props(fallback = "This message is a receipt notification."))] - ReadRcptMailBody = 192, } impl StockMessage { @@ -795,16 +789,6 @@ pub(crate) async fn finger_prints(context: &Context) -> String { translated(context, StockMessage::FingerPrints).await } -/// Stock string: `Return receipt`. -pub(crate) async fn read_rcpt(context: &Context) -> String { - translated(context, StockMessage::ReadRcpt).await -} - -/// Stock string: `This message is a receipt notification.`. -pub(crate) async fn read_rcpt_mail_body(context: &Context) -> String { - translated(context, StockMessage::ReadRcptMailBody).await -} - /// Stock string: `Group image deleted.`. pub(crate) async fn msg_grp_img_deleted(context: &Context, by_contact: ContactId) -> String { if by_contact == ContactId::SELF {