From 9785b9856c64824507d33daa00f584a9c679663a Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 19 Jun 2024 17:55:19 +0200 Subject: [PATCH] fix(web): profile update form correctly creates obj --- web/src/page/config.rs | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/web/src/page/config.rs b/web/src/page/config.rs index 578c812c..617dbdae 100644 --- a/web/src/page/config.rs +++ b/web/src/page/config.rs @@ -1,4 +1,4 @@ -use apb::{ActivityMut, Object, ObjectMut}; +use apb::{ActivityMut, DocumentMut, Object, ObjectMut}; use leptos::*; use crate::{prelude::*, DEFAULT_COLOR}; @@ -131,10 +131,31 @@ pub fn ConfigPage(setter: WriteSignal) -> impl IntoView { ) -> impl IntoView { .set_to(apb::Node::links(vec![apb::target::PUBLIC.to_string(), format!("{id}/followers")])) .set_object(apb::Node::object( (*me).clone() - .set_name(Some(&display_name)) - .set_summary(Some(&summary)) - .set_icon(apb::Node::link(avatar)) - .set_image(apb::Node::link(banner)) + .set_name(display_name.as_deref()) + .set_summary(summary.as_deref()) + .set_icon(apb::Node::maybe_object(avatar)) + .set_image(apb::Node::maybe_object(banner)) .set_published(Some(chrono::Utc::now())) ));