From a735e16f73423e7a8bc30738b774a285558eb2da Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 14 Apr 2024 03:39:52 +0200 Subject: [PATCH] fix: image and icon live under url --- src/model/user.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model/user.rs b/src/model/user.rs index c8d8fc1f..9d08cd69 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -1,6 +1,6 @@ use sea_orm::entity::prelude::*; -use apb::{Collection, Actor, PublicKey, ActorType}; +use apb::{Collection, Object, Actor, PublicKey, ActorType}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "users")] @@ -47,8 +47,8 @@ impl Model { name: object.name().map(|x| x.to_string()), summary: object.summary().map(|x| x.to_string()), icon: object.icon().id(), - image: object.image().id(), - inbox: object.inbox().id(), + image: object.image().get().map(|x| x.url().id().unwrap_or_default()), + inbox: object.inbox().get().map(|x| x.url().id().unwrap_or_default()), outbox: object.inbox().id(), shared_inbox: None, // TODO!!! parse endpoints followers: object.followers().id(),