mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
WIP, untested: Receiving side of passing broadcast secret in a message
This commit is contained in:
@@ -16,6 +16,7 @@ use regex::Regex;
|
||||
|
||||
use crate::chat::{
|
||||
self, Chat, ChatId, ChatIdBlocked, ProtectionStatus, remove_from_chat_contacts_table,
|
||||
save_broadcast_shared_secret,
|
||||
};
|
||||
use crate::config::Config;
|
||||
use crate::constants::{self, Blocked, Chattype, DC_CHAT_ID_TRASH, EDITED_PREFIX, ShowEmails};
|
||||
@@ -3567,6 +3568,10 @@ async fn apply_in_broadcast_changes(
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(secret) = mime_parser.get_header(HeaderDef::ChatBroadcastSecret) {
|
||||
save_broadcast_shared_secret(context, chat.id, secret).await?;
|
||||
}
|
||||
|
||||
if send_event_chat_modified {
|
||||
context.emit_event(EventType::ChatModified(chat.id));
|
||||
chatlist_events::emit_chatlist_item_changed(context, chat.id);
|
||||
|
||||
Reference in New Issue
Block a user