Skip to content

Commit ebe07aa

Browse files
committed
Remove old relay code from handlers
1 parent 5a8096c commit ebe07aa

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

includes/handler/class-announce.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ public static function init() {
3535
* @param \Activitypub\Activity\Activity $activity The activity object.
3636
*/
3737
public static function handle_announce( $announcement, $user_ids, $activity = null ) {
38-
// Check if this should be relayed.
39-
if ( $activity && \Activitypub\Relay::should_relay( $activity, $user_ids ) ) {
40-
\Activitypub\Relay::forward_activity( $activity );
41-
}
42-
4338
// Check if Activity is public or not.
4439
if ( ! is_activity_public( $announcement ) ) {
4540
// @todo maybe send email

includes/handler/class-create.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ public static function init() {
3636
* @param \Activitypub\Activity\Activity $activity_object Optional. The activity object. Default null.
3737
*/
3838
public static function handle_create( $activity, $user_ids, $activity_object = null ) {
39-
// Check if this should be relayed.
40-
if ( $activity_object && \Activitypub\Relay::should_relay( $activity_object, $user_ids ) ) {
41-
\Activitypub\Relay::forward_activity( $activity_object );
42-
}
43-
4439
// Check for private and/or direct messages.
4540
if ( ACTIVITYPUB_CONTENT_VISIBILITY_PRIVATE === get_activity_visibility( $activity ) ) {
4641
$result = false;

includes/handler/class-delete.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ public static function init() {
3939
* @param int|int[] $user_ids The local user ID(s).
4040
*/
4141
public static function handle_delete( $activity, $user_ids ) {
42-
// Check if this should be relayed.
43-
if ( \Activitypub\Relay::should_relay( $activity, $user_ids ) ) {
44-
\Activitypub\Relay::forward_activity( $activity );
45-
}
46-
4742
$object_type = $activity['object']['type'] ?? '';
4843

4944
switch ( $object_type ) {

includes/handler/class-update.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public static function init() {
3333
* @param \Activitypub\Activity\Activity $activity_object The activity object. Default null.
3434
*/
3535
public static function handle_update( $activity, $user_ids, $activity_object ) {
36-
// Check if this should be relayed.
37-
if ( $activity_object && \Activitypub\Relay::should_relay( $activity_object, $user_ids ) ) {
38-
\Activitypub\Relay::forward_activity( $activity_object );
39-
}
40-
4136
$object_type = $activity['object']['type'] ?? '';
4237

4338
switch ( $object_type ) {

0 commit comments

Comments
 (0)