Fix a but about blog title and AP URL

This commit is contained in:
Kitaiti Makoto 2023-01-03 22:09:13 +09:00
parent d20ce6dd0b
commit ee1e553460
2 changed files with 9 additions and 6 deletions

View File

@ -18,10 +18,13 @@ use openssl::{
rsa::Rsa,
sign::{Signer, Verifier},
};
use plume_common::activity_pub::{
inbox::{AsActor, FromId},
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty,
ToAsString, ToAsUri,
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::*;
@ -450,7 +453,7 @@ impl FromId<DbConn> for Blog {
let any_base = AnyBase::from_extended(object)?;
let id = any_base.id().ok_or(Error::MissingApProperty)?;
new_blog.ap_url = id.to_string();
new_blog.ap_url = iri_percent_encode_seg(id.as_ref());
let inst = id
.authority_components()

View File

@ -255,7 +255,7 @@ impl Post {
ap_url(&format!(
"{}/~/{}/{}/",
CONFIG.base_url,
blog.fqn,
iri_percent_encode_seg(&blog.fqn),
iri_percent_encode_seg(slug)
))
}