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 7daa6cc8d9
commit b10d54d6ef
9 changed files with 275 additions and 112 deletions

View File

@@ -12,7 +12,7 @@ use deltachat::calls::ice_servers;
use deltachat::chat::{
self, add_contact_to_chat, forward_msgs, forward_msgs_2ctx, get_chat_media, get_chat_msgs,
get_chat_msgs_ex, markfresh_chat, marknoticed_all_chats, marknoticed_chat,
remove_contact_from_chat, Chat, ChatId, ChatItem, MessageListOptions,
remove_contact_from_chat, Chat, ChatId, ChatItem, ChatMsgsFilter, GetChatMsgsOptions,
};
use deltachat::chatlist::Chatlist;
use deltachat::config::{get_all_ui_config_keys, Config};
@@ -1382,9 +1382,10 @@ impl CommandApi {
let msg = get_chat_msgs_ex(
&ctx,
ChatId::new(chat_id),
MessageListOptions {
info_only,
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
add_daymarker,
..Default::default()
},
)
.await?;
@@ -1428,9 +1429,10 @@ impl CommandApi {
let msg = get_chat_msgs_ex(
&ctx,
ChatId::new(chat_id),
MessageListOptions {
info_only,
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
add_daymarker,
..Default::default()
},
)
.await?;