Don't encode whole AP ID

This commit is contained in:
Kitaiti Makoto 2023-01-04 17:48:31 +09:00
parent ee1e553460
commit 40e1a1fc2c

View file

@ -18,13 +18,10 @@ 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,
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty,
ToAsString, ToAsUri,
};
use webfinger::*;
@ -453,7 +450,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 = iri_percent_encode_seg(id.as_ref());
new_blog.ap_url = id.to_string();
let inst = id
.authority_components()