mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-14 05:31:02 +00:00
Spawn cache tasks for new follows
This commit is contained in:
parent
52408d8189
commit
1c813d917b
3 changed files with 10 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1933,7 +1933,7 @@ checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
|
|||
|
||||
[[package]]
|
||||
name = "relay"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
dependencies = [
|
||||
"activitystreams",
|
||||
"activitystreams-ext",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "relay"
|
||||
description = "A simple activitypub relay"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||
config::{Config, UrlKind},
|
||||
db::Actor,
|
||||
error::MyError,
|
||||
jobs::{apub::prepare_activity, Deliver, JobState},
|
||||
jobs::{apub::prepare_activity, Deliver, JobState, QueryInstance, QueryNodeinfo},
|
||||
};
|
||||
use activitystreams::{
|
||||
activity::{Accept as AsAccept, Follow as AsFollow},
|
||||
|
@ -49,6 +49,13 @@ impl Follow {
|
|||
state
|
||||
.job_server
|
||||
.queue(Deliver::new(self.actor.inbox, accept)?)?;
|
||||
|
||||
state
|
||||
.job_server
|
||||
.queue(QueryInstance::new(self.actor.id.clone()))?;
|
||||
|
||||
state.job_server.queue(QueryNodeinfo::new(self.actor.id))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue