From 704e9aa47fb46a27ec6c7fe0be4fa43f09baf81c Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Thu, 5 Jan 2023 04:13:40 +0900 Subject: [PATCH] Make blogs.fqn valid --- plume-models/src/blogs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plume-models/src/blogs.rs b/plume-models/src/blogs.rs index 0458895c..53f3c76e 100644 --- a/plume-models/src/blogs.rs +++ b/plume-models/src/blogs.rs @@ -18,11 +18,11 @@ use openssl::{ rsa::Rsa, sign::{Signer, Verifier}, }; -use plume_common::activity_pub::{ +use plume_common::{activity_pub::{ inbox::{AsActor, FromId}, sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty, ToAsString, ToAsUri, -}; +}, utils::iri_percent_encode_seg}; use webfinger::*; #[derive(Queryable, Identifiable, Clone, AsChangeset, Debug)] @@ -83,9 +83,9 @@ impl Blog { if inserted.fqn.is_empty() { if instance.local { - inserted.fqn = inserted.actor_id.clone(); + inserted.fqn = iri_percent_encode_seg(&inserted.actor_id.clone()); } else { - inserted.fqn = format!("{}@{}", inserted.actor_id, instance.public_domain); + inserted.fqn = format!("{}@{}", iri_percent_encode_seg(&inserted.actor_id), instance.public_domain); } }