forked from alemi/upub
fix: always embed specific activities
This commit is contained in:
parent
7617170206
commit
abf4e8b370
1 changed files with 9 additions and 3 deletions
|
@ -78,9 +78,15 @@ async fn worker(db: DatabaseConnection, domain: String, poll_interval: u64, mut
|
||||||
{
|
{
|
||||||
Some((activity, None)) => activity.ap(),
|
Some((activity, None)) => activity.ap(),
|
||||||
Some((activity, Some(object))) => {
|
Some((activity, Some(object))) => {
|
||||||
// embed local object when dispatching
|
let always_embed = matches!(
|
||||||
// TODO this .contains() is jank, could trick us into embedding remote activities
|
activity.activity_type,
|
||||||
if object.id.contains(&domain) {
|
apb::ActivityType::Create
|
||||||
|
| apb::ActivityType::Undo
|
||||||
|
| apb::ActivityType::Update
|
||||||
|
| apb::ActivityType::Accept(_)
|
||||||
|
| apb::ActivityType::Reject(_)
|
||||||
|
);
|
||||||
|
if always_embed {
|
||||||
activity.ap().set_object(Node::object(object.ap()))
|
activity.ap().set_object(Node::object(object.ap()))
|
||||||
} else {
|
} else {
|
||||||
activity.ap()
|
activity.ap()
|
||||||
|
|
Loading…
Reference in a new issue