mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-25 04:51:27 +00:00
Percent encode remote interact URI
This commit is contained in:
parent
703328601c
commit
b7c7b6da9f
1 changed files with 7 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
use activitypub::collection::{OrderedCollection, OrderedCollectionPage};
|
||||
use diesel::SaveChangesDsl;
|
||||
use rocket::{
|
||||
http::{ContentType, Cookies},
|
||||
http::{uri::Uri, ContentType, Cookies},
|
||||
request::LenientForm,
|
||||
response::{status, Content, Flash, Redirect},
|
||||
};
|
||||
|
@ -134,7 +134,12 @@ pub fn follow_not_connected(
|
|||
if let Some(remote_form) = remote_form {
|
||||
if let Some(uri) = User::fetch_remote_interact_uri(&remote_form)
|
||||
.ok()
|
||||
.and_then(|uri| Some(uri.replace("{uri}", &target.acct_authority(&conn).ok()?)))
|
||||
.and_then(|uri| {
|
||||
Some(uri.replace(
|
||||
"{uri}",
|
||||
&Uri::percent_encode(&target.acct_authority(&conn).ok()?),
|
||||
))
|
||||
})
|
||||
{
|
||||
Ok(Redirect::to(uri).into())
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue