feat: Send webxdc name instead of raw file name in pre-messages. Display it in summary (#7790)

The webxdc file name itself isn't informative for users. Still, send and display it if the webxdc
manifest can't be parsed, it's better than sending "Mini App" and this isn't a normal case anyway.
This commit is contained in:
iequidoo
2026-02-05 04:45:47 -03:00
committed by iequidoo
parent 4041d9a54e
commit ba64d8d19b
4 changed files with 48 additions and 8 deletions

View File

@@ -41,6 +41,14 @@ impl PostMsgMetadata {
.get(Param::Filename)
.unwrap_or_default()
.to_owned();
let filename = match message.viewtype {
Viewtype::Webxdc => message
.get_webxdc_info(context)
.await
.map(|info| info.name)
.unwrap_or_else(|_| filename),
_ => filename,
};
let wh = {
match (
message.param.get_int(Param::Width),