mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 20:06:30 +03:00
fix: Don't send self-avatar in unencrypted messages (#7136)
We don't display avatars for address-contacts, so sending avatars w/o encryption is not useful and causes e.g. Outlook to reject a message with a big header, see https://support.delta.chat/t/invalid-mime-content-single-text-value-size-32822-exceeded-allowed-maximum-32768-for-the-chat-user-avatar-header/4067.
This commit is contained in:
@@ -464,7 +464,11 @@ impl MimeFactory {
|
||||
.unwrap_or_default(),
|
||||
false => "".to_string(),
|
||||
};
|
||||
let attach_selfavatar = Self::should_attach_selfavatar(context, &msg).await;
|
||||
// We don't display avatars for address-contacts, so sending avatars w/o encryption is not
|
||||
// useful and causes e.g. Outlook to reject a message with a big header, see
|
||||
// https://support.delta.chat/t/invalid-mime-content-single-text-value-size-32822-exceeded-allowed-maximum-32768-for-the-chat-user-avatar-header/4067.
|
||||
let attach_selfavatar =
|
||||
Self::should_attach_selfavatar(context, &msg).await && encryption_pubkeys.is_some();
|
||||
|
||||
ensure_and_debug_assert!(
|
||||
member_timestamps.is_empty()
|
||||
|
||||
Reference in New Issue
Block a user