feat: Send Chat-Group-Avatar as inline base64 (#5253)

Before group avatar was sent as an attachment. Let's do the same as with user avatar and send group
avatar as base64. Receiver code uses the same functions for user and chat avatars, so base64 avatars
are supported for most receivers already.
This commit is contained in:
iequidoo
2024-02-23 01:09:30 -03:00
committed by iequidoo
parent 256c8c13f1
commit 9862d40f89
2 changed files with 17 additions and 21 deletions

View File

@@ -265,8 +265,10 @@ impl MimeMessage {
for field in &part.headers {
let key = field.get_key().to_lowercase();
// For now only Chat-User-Avatar can be hidden.
if !headers.contains_key(&key) && key == "chat-user-avatar" {
// For now only avatar headers can be hidden.
if !headers.contains_key(&key)
&& (key == "chat-user-avatar" || key == "chat-group-avatar")
{
headers.insert(key.to_string(), field.get_value());
}
}