forked from alemi/upub
fix: activity redirects when fetching different id
This commit is contained in:
parent
3df01b5b0a
commit
63ba54dad9
1 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,10 @@ pub async fn view(
|
|||
) -> crate::Result<JsonLD<serde_json::Value>> {
|
||||
let aid = ctx.uri("activities", id);
|
||||
if auth.is_local() && query.fetch && !ctx.is_local(&aid) {
|
||||
ctx.fetch_activity(&aid).await?;
|
||||
let obj = ctx.fetch_activity(&aid).await?;
|
||||
if obj.id != aid {
|
||||
return Err(UpubError::Redirect(obj.id));
|
||||
}
|
||||
}
|
||||
|
||||
let row = model::addressing::Entity::find_addressed()
|
||||
|
|
Loading…
Reference in a new issue