Compare commits
2 commits
d830576e66
...
417ab22a7b
Author | SHA1 | Date | |
---|---|---|---|
417ab22a7b | |||
b36e9f5bf5 |
2 changed files with 2 additions and 4 deletions
|
@ -21,7 +21,7 @@ pub enum Identity {
|
||||||
|
|
||||||
impl Identity {
|
impl Identity {
|
||||||
pub fn filter_condition(&self) -> Condition {
|
pub fn filter_condition(&self) -> Condition {
|
||||||
let base_cond = Condition::any().add(model::addressing::Column::Actor.eq(apb::target::PUBLIC));
|
let base_cond = Condition::any().add(model::addressing::Column::Actor.is_null());
|
||||||
match self {
|
match self {
|
||||||
Identity::Anonymous => base_cond,
|
Identity::Anonymous => base_cond,
|
||||||
Identity::Remote { internal, .. } => base_cond.add(model::addressing::Column::Instance.eq(*internal)),
|
Identity::Remote { internal, .. } => base_cond.add(model::addressing::Column::Instance.eq(*internal)),
|
||||||
|
|
|
@ -236,9 +236,7 @@ async fn fetch_object_inner(ctx: &Context, id: &str, depth: usize) -> crate::Res
|
||||||
return Ok(x); // already in db, easy
|
return Ok(x); // already in db, easy
|
||||||
}
|
}
|
||||||
|
|
||||||
let object = Context::request(
|
let object = ctx.pull_object(id).await?;
|
||||||
Method::GET, id, None, &format!("https://{}", ctx.domain()), ctx.pkey(), ctx.domain(),
|
|
||||||
).await?.json::<serde_json::Value>().await?;
|
|
||||||
|
|
||||||
if let Some(oid) = object.id() {
|
if let Some(oid) = object.id() {
|
||||||
if oid != id {
|
if oid != id {
|
||||||
|
|
Loading…
Reference in a new issue