Skip to content

Commit 17c65d9

Browse files
committed
fix some dispatcher issues
1 parent 11cdbd2 commit 17c65d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

includes/class-activity-dispatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static function send_profile_update( $user_id ) {
137137
$activity->set_type( 'Update' );
138138
$activity->set_actor( $user->get_id() );
139139
$activity->set_object( $user->get_id() );
140-
$activity->set_to( 'https://www.w3.org/ns/activitystreams#Public' );
140+
$activity->set_to( array( 'https://www.w3.org/ns/activitystreams#Public' ) );
141141

142142
// Send the update.
143143
self::send_activity_to_followers( $activity, $user_id, $user );
@@ -268,8 +268,8 @@ public static function add_inboxes_of_follower( $inboxes, $user_id ) {
268268
* @return array The filtered Inboxes.
269269
*/
270270
public static function add_inboxes_by_mentioned_actors( $inboxes, $user_id, $activity ) {
271-
$cc = $activity->get_cc();
272-
$to = $activity->get_to();
271+
$cc = $activity->get_cc() ?? array();
272+
$to = $activity->get_to() ?? array();
273273

274274
$audience = array_merge( $cc, $to );
275275

0 commit comments

Comments
 (0)