fix: address_to helper
This commit is contained in:
parent
0c203528df
commit
0a19915773
1 changed files with 7 additions and 9 deletions
|
@ -216,15 +216,13 @@ impl Context {
|
||||||
for target in targets {
|
for target in targets {
|
||||||
if target.ends_with("/followers") {
|
if target.ends_with("/followers") {
|
||||||
let target_id = target.replace("/followers", "");
|
let target_id = target.replace("/followers", "");
|
||||||
model::relation::Entity::find()
|
let mut followers = model::relation::Entity::followers(&target_id, self.db()).await?;
|
||||||
.filter(model::relation::Column::Following.eq(target_id))
|
if followers.is_empty() { // stuff with zero addressing will never be seen again!!! TODO
|
||||||
.select_only()
|
followers.push(target_id);
|
||||||
.select_column(model::relation::Column::Follower)
|
}
|
||||||
.into_tuple::<String>()
|
for follower in followers {
|
||||||
.all(self.db())
|
out.push(follower);
|
||||||
.await?
|
}
|
||||||
.into_iter()
|
|
||||||
.for_each(|x| out.push(x));
|
|
||||||
} else {
|
} else {
|
||||||
out.push(target);
|
out.push(target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue