diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 197721085..e4b7df644 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -7214,6 +7214,8 @@ void dc_event_unref(dc_event_t* event); /// "Unknown sender for this chat. See 'info' for more details." /// /// Use as message text if assigning the message to a chat is not totally correct. +/// +/// @deprecated 2025-08-18 #define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72 /// "Message from %1$s" diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 760a14379..70fb2c86e 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -1693,12 +1693,6 @@ async fn add_parts( let name: &str = from.display_name.as_ref().unwrap_or(&from.addr); for part in &mut mime_parser.parts { part.param.set(Param::OverrideSenderDisplayname, name); - - if chat.is_protected() { - // In protected chat, also mark the message with an error. - let s = stock_str::unknown_sender_for_chat(context).await; - part.error = Some(s); - } } } } diff --git a/src/securejoin/securejoin_tests.rs b/src/securejoin/securejoin_tests.rs index b5f3fcd84..e245e7d8e 100644 --- a/src/securejoin/securejoin_tests.rs +++ b/src/securejoin/securejoin_tests.rs @@ -634,7 +634,7 @@ async fn test_unknown_sender() -> Result<()> { // The message from Bob is delivered late, Bob is already removed. let msg = alice.recv_msg(&sent).await; assert_eq!(msg.text, "Hi hi!"); - assert_eq!(msg.error.unwrap(), "Unknown sender for this chat."); + assert_eq!(msg.get_override_sender_name().unwrap(), "bob@example.net"); Ok(()) } diff --git a/src/stock_str.rs b/src/stock_str.rs index acc3099e0..3a95caeaf 100644 --- a/src/stock_str.rs +++ b/src/stock_str.rs @@ -123,9 +123,6 @@ pub enum StockMessage { however, of course, if they like, you may point them to 👉 https://get.delta.chat"))] WelcomeMessage = 71, - #[strum(props(fallback = "Unknown sender for this chat."))] - UnknownSenderForChat = 72, - #[strum(props(fallback = "Message from %1$s"))] SubjectForNewContact = 73, @@ -909,11 +906,6 @@ pub(crate) async fn welcome_message(context: &Context) -> String { translated(context, StockMessage::WelcomeMessage).await } -/// Stock string: `Unknown sender for this chat.`. -pub(crate) async fn unknown_sender_for_chat(context: &Context) -> String { - translated(context, StockMessage::UnknownSenderForChat).await -} - /// Stock string: `Message from %1$s`. // TODO: This can compute `self_name` itself instead of asking the caller to do this. pub(crate) async fn subject_for_new_contact(context: &Context, self_name: &str) -> String {