forked from alemi/upub
fix: dispatch activities with @context
This commit is contained in:
parent
fc206cc715
commit
8b75e2be84
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ use sea_orm::{ColumnTrait, DatabaseConnection, EntityTrait, Order, QueryFilter,
|
||||||
use tokio::{sync::broadcast, task::JoinHandle};
|
use tokio::{sync::broadcast, task::JoinHandle};
|
||||||
|
|
||||||
use apb::{ActivityMut, Node};
|
use apb::{ActivityMut, Node};
|
||||||
use crate::{errors::UpubError, model, server::{fetcher::Fetcher, Context}};
|
use crate::{errors::UpubError, model, routes::activitypub::jsonld::LD, server::{fetcher::Fetcher, Context}};
|
||||||
|
|
||||||
pub struct Dispatcher {
|
pub struct Dispatcher {
|
||||||
waker: broadcast::Sender<()>,
|
waker: broadcast::Sender<()>,
|
||||||
|
@ -87,9 +87,9 @@ async fn worker(db: DatabaseConnection, domain: String, poll_interval: u64, mut
|
||||||
| apb::ActivityType::Reject(_)
|
| apb::ActivityType::Reject(_)
|
||||||
);
|
);
|
||||||
if always_embed {
|
if always_embed {
|
||||||
activity.ap().set_object(Node::object(object.ap()))
|
activity.ap().set_object(Node::object(object.ap())).ld_context()
|
||||||
} else {
|
} else {
|
||||||
activity.ap()
|
activity.ap().ld_context()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
|
|
Loading…
Reference in a new issue