wrap update-item-array into an update-object on the wire; this allows to add other members in the future. the updates the peers see is not changed

This commit is contained in:
B. Petersen
2022-01-10 12:42:23 +01:00
committed by bjoern
parent 8c2ea0fa26
commit 42f9ef00b9
2 changed files with 54 additions and 11 deletions

View File

@@ -1163,8 +1163,10 @@ impl<'a> MimeFactory<'a> {
let json = self.msg.param.get(Param::Arg).unwrap_or_default();
parts.push(context.build_status_update_part(json).await);
} else if self.msg.viewtype == Viewtype::Webxdc {
let json = context.get_webxdc_status_updates(self.msg.id, None).await?;
if json != "[]" {
let json = context
.render_webxdc_status_update_object(self.msg.id, None)
.await?;
if json != r#"{{"updates":[]}}"# {
parts.push(context.build_status_update_part(&json).await);
}
}