Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deltachat-ffi/deltachat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7749,6 +7749,11 @@ void dc_event_unref(dc_event_t* event);
/// Description in connectivity view when proxy is enabled.
#define DC_STR_PROXY_ENABLED_DESCRIPTION 221

/// "Messages in this chat use classic email and are not encrypted."
///
/// Used as the first info messages in newly created classic email threads.
#define DC_STR_CHAT_UNENCRYPTED_EXPLANATON 230

/**
* @}
*/
Expand Down
8 changes: 7 additions & 1 deletion src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3463,7 +3463,13 @@ pub(crate) async fn create_group_ex(
if !context.get_config_bool(Config::Bot).await?
&& !context.get_config_bool(Config::SkipStartMessages).await?
{
let text = stock_str::new_group_send_first_message(context).await;
let text = if !grpid.is_empty() {
// Add "Others will only see this group after you sent a first message." message.
stock_str::new_group_send_first_message(context).await
} else {
// Add "Messages in this chat use classic email and are not encrypted." message.
stock_str::chat_unencrypted_explanation(context).await
};
add_info_msg(context, chat_id, &text, create_smeared_timestamp(context)).await?;
}
if let (true, true) = (sync.into(), !grpid.is_empty()) {
Expand Down
8 changes: 8 additions & 0 deletions src/stock_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ https://delta.chat/donate"))]
fallback = "You are using a proxy. If you're having trouble connecting, try a different proxy."
))]
ProxyEnabledDescription = 221,

#[strum(props(fallback = "Messages in this chat use classic email and are not encrypted."))]
ChatUnencryptedExplanation = 230,
}

impl StockMessage {
Expand Down Expand Up @@ -1335,6 +1338,11 @@ pub(crate) async fn proxy_description(context: &Context) -> String {
translated(context, StockMessage::ProxyEnabledDescription).await
}

/// Stock string: `Messages in this chat use classic email and are not encrypted.`.
pub(crate) async fn chat_unencrypted_explanation(context: &Context) -> String {
translated(context, StockMessage::ChatUnencryptedExplanation).await
}

impl Context {
/// Set the stock string for the [StockMessage].
///
Expand Down