mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 11:37:46 +02:00
fix(activitypub): add target_actor_id for create activity to broadcast post reply
This commit is contained in:
parent
962dd305f5
commit
0128a21ec5
3 changed files with 11 additions and 7 deletions
|
|
@ -28,12 +28,14 @@ class SchedulerController extends Controller
|
|||
// Send activity to all followers
|
||||
foreach ($scheduledActivities as $scheduledActivity) {
|
||||
if ($scheduledActivity->target_actor_id !== null) {
|
||||
// send activity to targeted actor
|
||||
send_activity_to_actor(
|
||||
$scheduledActivity->actor,
|
||||
$scheduledActivity->targetActor,
|
||||
json_encode($scheduledActivity->payload, JSON_THROW_ON_ERROR)
|
||||
);
|
||||
if ($scheduledActivity->actor_id !== $scheduledActivity->target_actor_id) {
|
||||
// send activity to targeted actor
|
||||
send_activity_to_actor(
|
||||
$scheduledActivity->actor,
|
||||
$scheduledActivity->targetActor,
|
||||
json_encode($scheduledActivity->payload, JSON_THROW_ON_ERROR)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// send activity to all actor followers
|
||||
send_activity_to_followers(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue