feat: Make summary for pre-messages look like summary for fully downloaded messages (#7775)

This is not possible for webxdcs and vCards currently however, so add workarounds for them:
- Use translated "Mini App" as the webxdc name.
- Use just "👤" instead of the vCard summary (i.e. the vCard contact name).
This commit is contained in:
iequidoo
2026-01-29 09:31:35 -03:00
committed by iequidoo
parent 955f79923a
commit c08644490a
4 changed files with 77 additions and 27 deletions

View File

@@ -17,10 +17,10 @@ pub async fn send_large_file_message<'a>(
content: &[u8],
) -> Result<(SentMessage<'a>, SentMessage<'a>, MsgId)> {
let mut msg = Message::new(view_type);
let file_name = if view_type == Viewtype::Webxdc {
"test.xdc"
} else {
"test.bin"
let file_name = match view_type {
Viewtype::Webxdc => "test.xdc",
Viewtype::Vcard => "test.vcf",
_ => "test.bin",
};
msg.set_file_from_bytes(sender, file_name, content, None)?;
msg.set_text("test".to_owned());