1
0
Fork 0
forked from alemi/upub

fix: dispatch activities with @context

This commit is contained in:
əlemi 2024-05-02 15:12:36 +02:00
parent fc206cc715
commit 8b75e2be84
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -3,7 +3,7 @@ use sea_orm::{ColumnTrait, DatabaseConnection, EntityTrait, Order, QueryFilter,
use tokio::{sync::broadcast, task::JoinHandle};
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 {
waker: broadcast::Sender<()>,
@ -87,9 +87,9 @@ async fn worker(db: DatabaseConnection, domain: String, poll_interval: u64, mut
| apb::ActivityType::Reject(_)
);
if always_embed {
activity.ap().set_object(Node::object(object.ap()))
activity.ap().set_object(Node::object(object.ap())).ld_context()
} else {
activity.ap()
activity.ap().ld_context()
}
},
None => {