fix: don't send or process webxdc status updates in pre-messages

it makes no sense to send or receive status updates in pre-messages for large webxdc attachments because they can't be processed anyway.
This commit is contained in:
holger krekel
2026-06-11 21:58:59 +02:00
parent 87c1fb2118
commit 6cd5b21a26
3 changed files with 31 additions and 9 deletions

View File

@@ -1813,14 +1813,15 @@ impl MimeFactory {
HeaderDef::IrohGossipTopic.get_headername(),
mail_builder::headers::raw::Raw::new(topic).into(),
));
if let (Some(json), _) = context
.render_webxdc_status_update_object(
msg.id,
StatusUpdateSerial::MIN,
StatusUpdateSerial::MAX,
None,
)
.await?
if !matches!(self.pre_message_mode, PreMessageMode::Pre { .. })
&& let (Some(json), _) = context
.render_webxdc_status_update_object(
msg.id,
StatusUpdateSerial::MIN,
StatusUpdateSerial::MAX,
None,
)
.await?
{
parts.push(context.build_status_update_part(&json));
}