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