feat: Resend the last 10 messages to new broadcast member (#7678)

Messages are sent and encrypted only to the new member. This way we at least postpone spreading the
information that the new member joined: even if the server operator is a broadcast member, they
can't know that immediately.
This commit is contained in:
iequidoo
2026-02-12 04:03:13 -03:00
parent ef718bb869
commit 1e29e99c6f
9 changed files with 261 additions and 111 deletions

View File

@@ -22,7 +22,7 @@ use std::sync::{Arc, LazyLock, Mutex};
use std::time::{Duration, SystemTime};
use anyhow::Context as _;
use deltachat::chat::{ChatId, ChatVisibility, MessageListOptions, MuteDuration};
use deltachat::chat::{ChatId, ChatMsgsFilter, ChatVisibility, GetChatMsgsOptions, MuteDuration};
use deltachat::constants::DC_MSG_ID_LAST_SPECIAL;
use deltachat::contact::{Contact, ContactId, Origin};
use deltachat::context::{Context, ContextBuilder};
@@ -1345,9 +1345,10 @@ pub unsafe extern "C" fn dc_get_chat_msgs(
chat::get_chat_msgs_ex(
ctx,
ChatId::new(chat_id),
MessageListOptions {
info_only,
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
add_daymarker,
..Default::default()
},
)
.await