diff --git a/src/server/inbox.rs b/src/server/inbox.rs index d11516da..7b96b19d 100644 --- a/src/server/inbox.rs +++ b/src/server/inbox.rs @@ -238,7 +238,7 @@ impl apb::server::Inbox for Context { // TODO oof here is an example of the weakness of this model, we have to go all the way // back up to serde_json::Value because impl Object != impl Actor let actor_model = model::user::Model::new(&object_node)?; - let update_model = actor_model.into_active_model(); + let mut update_model = actor_model.into_active_model(); update_model.reset(model::user::Column::Name); update_model.reset(model::user::Column::Summary); update_model.reset(model::user::Column::Image); @@ -248,7 +248,7 @@ impl apb::server::Inbox for Context { }, Some(apb::ObjectType::Note) => { let object_model = model::object::Model::new(&object_node)?; - let update_model = object_model.into_active_model(); + let mut update_model = object_model.into_active_model(); update_model.reset(model::object::Column::Name); update_model.reset(model::object::Column::Summary); update_model.reset(model::object::Column::Content); diff --git a/src/server/outbox.rs b/src/server/outbox.rs index 7b4ae196..99918b3a 100644 --- a/src/server/outbox.rs +++ b/src/server/outbox.rs @@ -303,7 +303,7 @@ impl apb::server::Outbox for Context { match object_node.object_type() { Some(apb::ObjectType::Actor(_)) => { - let actor_model = model::user::Model::new( + let mut actor_model = model::user::Model::new( &object_node // TODO must set these, but we will ignore them .set_actor_type(Some(apb::ActorType::Person)) @@ -326,7 +326,7 @@ impl apb::server::Outbox for Context { if actor_model.image.is_none() { actor_model.image = old_actor_model.image } if actor_model.icon.is_none() { actor_model.icon = old_actor_model.icon } - let update_model = actor_model.into_active_model(); + let mut update_model = actor_model.into_active_model(); update_model.reset(model::user::Column::Name); update_model.reset(model::user::Column::Summary); update_model.reset(model::user::Column::Image); @@ -356,7 +356,7 @@ impl apb::server::Outbox for Context { if object_model.summary.is_none() { object_model.summary = old_object_model.summary } if object_model.content.is_none() { object_model.content = old_object_model.content } - let update_model = object_model.into_active_model(); + let mut update_model = object_model.into_active_model(); update_model.reset(model::object::Column::Name); update_model.reset(model::object::Column::Summary); update_model.reset(model::object::Column::Content);